Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private string PrintBody(Das.Order currentOrder, int filterTest, string memoName,Das.Counter curCounter, string EmpName, List<string> RoomNo)
- {
- StringBuilder str = new StringBuilder();
- int lineCount = 0;
- string strSpace;
- decimal price;
- string currency;
- foreach (Das.OrderLine oLine in currentOrder.TBOrderLines.OrderBy(a=>a.TestId))
- {
- if (filterTest == 1 || (filterTest == 2 && oLine.Test.Category.DepId == 40) || (filterTest == 3 && (oLine.Test.Category.DepId == 50 || oLine.Test.Category.DepId == 31)))
- {
- lineCount++;
- strSpace = new string(' ', 68);
- //strSpace = new string(' ', 35);
- //strSpace = "\n";
- //str.Replace(strSpace, Environment.NewLine);
- strSpace = strSpace.Insert(5, oLine.TestId.ToString());
- string fullTestName = (oLine.Test.TestEditable == true ? oLine.EditedTestName : oLine.Test.TestName);
- //string firstTestName = (oLine.Test.TestEditable == true ? oLine.EditedTestName : oLine.Test.TestName);
- //lineCount = lineCount + 1;
- //string lastTestName = (oLine.Test.TestEditable == true ? oLine.EditedTestName : oLine.Test.TestName);
- fullTestName = fullTestName ?? string.Empty;
- //string fullTestName = (firstTestName+lastTestName) ?? string.Empty;
- strSpace = strSpace.Insert(12, fullTestName);
- if (filterTest == 1)
- {
- price = oLine.TestPrice;
- currency = this.GetPriceInTaka(price);//String.Format("{0:C}", price);
- strSpace = strSpace.Insert(54, VbFunctionHelper.RAlign(currency, 12));
- }
- //====
- strSpace = strSpace.TrimEnd();
- //=========
- str.Append(strSpace + VbFunctionHelper.vbCrLf);
- if (lineCount > MAXLINE)
- {
- str.Append(" ----Cont. on Next Page----" + VbFunctionHelper.vbCrLf);
- str.Append(Convert.ToChar(27) + VbFunctionHelper.vbCr + Convert.ToChar(12));
- str.Append(VbFunctionHelper.vbCrLf);
- str.Append(this.PrintHeader(currentOrder, memoName, true, filterTest));
- lineCount = 0;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement