public int Delete() { DialogResult rs = MessageBox.Show("确认删除当前选中的数据吗", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rs == DialogResult.No) { return(1); } this.neuSpread1.StopCellEditing(); ReportPrint delReportPrint = this.neuSpread1_Sheet1.Rows[this.neuSpread1_Sheet1.ActiveRowIndex].Tag as ReportPrint; int param = this.DB.DeleteData(delReportPrint); if (param == -1) { MessageBox.Show("Delete failed," + this.DB.Err); return(-1); } this.neuSpread1_Sheet1.ActiveRow.Visible = false; this.isDirty = true; MessageBox.Show("删除成功"); return(0); }
public int Updata() { Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); ReportPrintManager DBManager = new ReportPrintManager(); ReportPrint reportPrint = GetParamInfo(); //首先删除原数据 int ret = DBManager.DeleteData(reportPrint); if (ret == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; return(-1); } //对维护数据进行重新插入 ret = DBManager.InsertData(reportPrint); if (ret == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; return(-1); } Neusoft.FrameWork.Management.PublicTrans.Commit(); return(0); }
private void neuSpread1_EditModeOff(object sender, EventArgs e) { if (!this.inited) { return; } int activeRowIndex = this.neuSpread1_Sheet1.ActiveRowIndex; int activeColumnIndex = this.neuSpread1_Sheet1.ActiveColumnIndex; ReportPrint reportPrint = this.neuSpread1_Sheet1.Rows[activeRowIndex].Tag as ReportPrint; if (this.neuSpread1_Sheet1.ActiveColumnIndex == 0) { reportPrint.ContainerDllName = this.neuSpread1_Sheet1.Cells[activeRowIndex, 0].Text; string[] r = this.GetControlNames(this.neuSpread1_Sheet1.Cells[activeRowIndex, activeColumnIndex].Text, typeof(IInterfaceContainer)); if (r == null) { return; } FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBoxCellType.Items = r; this.neuSpread1_Sheet1.Cells[activeRowIndex, 1].CellType = comboBoxCellType; } }
private ReportPrint GetParamInfo() { string dllName = string.Empty; string winName = string.Empty; string interfaceName = string.Empty; string state = string.Empty; string meno = string.Empty; ReportPrint reportInfo = new ReportPrint(); reportInfo.ContainerContorl = cmbWinName.SelectedItem.ToString(); reportInfo.ContainerDllName = cmbDLL.SelectedItem.ToString(); if (cmbType.Text != string.Empty && cmbType.SelectedValue != null) { reportInfo.ContainerType = (cmbType.SelectedValue as Neusoft.FrameWork.Models.NeuObject).ID; } reportInfo.Name = txtName.Text.Trim(); for (int i = 0; i < fpSpread_Info_Sheet1.Rows.Count; i++) { interfaceName = fpSpread_Info_Sheet1.Cells[i, 0].Text.Trim(); dllName = fpSpread_Info_Sheet1.Cells[i, 1].Text.Trim(); winName = fpSpread_Info_Sheet1.Cells[i, 2].Text.Trim(); state = Neusoft.FrameWork.Function.NConvert.ToInt32(fpSpread_Info_Sheet1.Cells[i, 3].Text.ToString()).ToString();; meno = fpSpread_Info_Sheet1.Cells[i, 4].Text.ToString(); reportInfo.Add(dllName, winName, 0, meno, interfaceName, state); } return(reportInfo); }
private void neuSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { ReportPrint reportPrint = this.neuSpread1_Sheet1.Rows[e.Row].Tag as ReportPrint; this.manual = true; if (reportPrint != null) { int ret = this.GetInterfaceNames(e.Row); if (ret == -1) { return; } int i = 0; foreach (ReportPrintControl reportPrintControl in reportPrint.ReportPrintControls) { i = reportPrintControl.Index; reportPrintControl.InterfaceName = this.neuSpread2_Sheet1.Cells[i, 0].Text; this.neuSpread2_Sheet1.Cells[i, 1].Text = reportPrintControl.DllName; this.neuSpread2_Sheet1.Cells[i, 2].Text = reportPrintControl.ControlName; this.neuSpread2_Sheet1.Cells[i, 3].Text = reportPrintControl.Memo; this.neuSpread2_Sheet1.Rows[i].Tag = reportPrintControl; this.SetInterfaceInstanceLocked(i, true); } } this.manual = false; }
public void UpdateInterfaceInfo(ReportPrint reportPrint) { Neusoft.HISFC.Components.Manager.Forms.frmMaintenacePop newAddForm = new Neusoft.HISFC.Components.Manager.Forms.frmMaintenacePop(reportPrint, resourceTypes, resourceTypesMapping); if (newAddForm.ShowDialog() == DialogResult.OK) { IntiTreeListView(); } }
public JsonResult GetPharSalesPrint5(ReportPrint aPrint) { string lcCondition = "WHERE TrDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "'"; _salesGateway.PrintReportPhar("PharDueInvoiceList(Detail).rpt", "VW_PHAR_DUE_INVOICE_LIST_DETAILS", lcCondition, "VW_PHAR_DUE_INVOICE_LIST_DETAILS", "Due Invoice List(Details)", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult GetPharSalesPrint7(ReportPrint aPrint) { string lcCondition = "WHERE InvoiceDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "'"; _salesGateway.PrintReportPhar("PharProfitReportSales.rpt", "VW_PHAR_PROFIT_REPORT_SALES", lcCondition, "VW_PHAR_PROFIT_REPORT_SALES", "Profit Refort Pharma Sales", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult GetPharSalesPrint8(ReportPrint aPrint) { string lcCondition = " WHERE TrDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' Order By Trdate ASC"; _salesGateway.PrintReportPhar("PharSalesSummary(UserWise).rpt", "VW_SELES_AND_COLL_REPORT_USER_WISE_SUMMARY", lcCondition, "VW_SELES_AND_COLL_REPORT_USER_WISE_SUMMARY", "Sales and Coll Report User Wise Summary", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult GetPharSalesPrint3(ReportPrint aPrint) { string lcCondition = "WHERE TrDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "'"; _salesGateway.PrintReportPhar("PharMedicineSalesAndCollection.rpt", "VW_PHAR_MEDICINE_SALES_COLLECTION", lcCondition, "VW_PHAR_MEDICINE_SALES_COLLECTION", "Sales And Collection", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult GetPharSalesPrint4(ReportPrint aPrint) { string lcCondition = "WHERE TrDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "'"; _salesGateway.PrintReportPhar("PharInvoiceRegister(DueCollection).rpt", "VW_PHAR_INVOICE_REG_DUE_COLL", lcCondition, "VW_PHAR_INVOICE_REG_DUE_COLL", "Invoic Register Due Collection", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public int Query() { this.inited = false; this.isDirty = false; Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在加载接口实现设置信息..."); Application.DoEvents(); List <ReportPrint> ret = this.DB.LoadData(); this.neuSpread1_Sheet1.RowCount = 0; foreach (ReportPrint reportPrint in ret) { this.neuSpread1_Sheet1.RowCount += 1; this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 0].Text = reportPrint.ContainerDllName; this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.RowCount - 1, 1].Text = reportPrint.ContainerContorl; this.neuSpread1_Sheet1.Rows[this.neuSpread1_Sheet1.RowCount - 1].Tag = reportPrint; } if (this.neuSpread1_Sheet1.RowCount == 0) { Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); return(0); } this.GetInterfaceNames(0); ReportPrint reportPrint1 = this.neuSpread1_Sheet1.Rows[0].Tag as ReportPrint; int i = 0; if (reportPrint1 != null) { foreach (ReportPrintControl reportPrintControl in reportPrint1.ReportPrintControls) { this.neuSpread2_Sheet1.Rows.Add(i, 1); this.neuSpread2_Sheet1.Cells[i, 1].Text = reportPrintControl.DllName; this.neuSpread2_Sheet1.Cells[i, 2].Text = reportPrintControl.ControlName; this.neuSpread2_Sheet1.Cells[i, 3].Text = reportPrintControl.Memo; this.SetInterfaceInstanceLocked(i, true); i++; } } this.inited = true; Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); return(0); }
public int Save() { Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); this.DB.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); int activeRowIndex = this.neuSpread1_Sheet1.ActiveRowIndex; ReportPrint reportPrint = this.neuSpread1_Sheet1.Rows[activeRowIndex].Tag as ReportPrint; foreach (ReportPrintControl reportPrintControl in reportPrint.ReportPrintControls) { if (string.IsNullOrEmpty(reportPrintControl.DllName) || string.IsNullOrEmpty(reportPrintControl.ControlName)) { reportPrintControl.InterfaceName = ""; } if (!string.IsNullOrEmpty(reportPrintControl.DllName) && !string.IsNullOrEmpty(reportPrintControl.ControlName)) { if (string.IsNullOrEmpty(reportPrintControl.InterfaceName)) { MessageBox.Show("接口实现不为空 但对应接口信息为空 请退出维护界面重试", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return(-1); } } } //首先删除原数据 int ret = this.DB.DeleteData(reportPrint); if (ret == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; MessageBox.Show("Save failed," + this.DB.Err); return(-1); } //对维护数据进行重新插入 ret = this.DB.InsertData(reportPrint); if (ret == -1) { Neusoft.FrameWork.Management.PublicTrans.RollBack();; MessageBox.Show("Save failed," + this.DB.Err); return(-1); } Neusoft.FrameWork.Management.PublicTrans.Commit(); this.isDirty = false; MessageBox.Show("Save Success", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Query(); return(0); }
/// <summary> /// 清机业务组合。 /// </summary> /// <param name="userName">收银员账号。</param> /// <returns>清机成功返回true,否则返回false。</returns> public static bool ClearMachine(string userName = null) { if (!frmPermission2.ShowPermission2("收银员清机", EnumRightType.ClearMachine, userName)) { return(false); } ReportPrint.PrintClearMachine(); //打印清机报表 ThreadPool.QueueUserWorkItem(t => { RestClient.OpenCash(); }); frmBase.Warning("清机成功!"); return(true); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string userID = User.Identity.Name; string schoolYear = Page.Request.QueryString["yID"]; string schoolCode = Page.Request.QueryString["sID"]; string signType = Page.Request.QueryString["tID"]; string reportName = Page.Request.QueryString["rID"]; ReportPrint.RenderPDF(reportName, userID, schoolYear, schoolCode, "1"); } }
private void ButtonPrint_OnClick(object sender, RoutedEventArgs e) { if (_dishSaleFullInfo == null || _dishSaleFullInfo.DishSaleInfos == null || !_dishSaleFullInfo.DishSaleInfos.Any()) { frmBase.Warning("没有需要打印的品项明细数据。"); return; } _dishSaleFullInfo.BranchId = Globals.branch_id; _dishSaleFullInfo.CurrentTime = DateTime.Now; _dishSaleFullInfo.TotalAmount = _dishSaleFullInfo.DishSaleInfos != null?_dishSaleFullInfo.DishSaleInfos.Sum(t => t.SalesAmount) : 0; ReportPrint.PrintDishSaleDetail(_dishSaleFullInfo); }
public int Add() { this.neuSpread1_Sheet1.RowCount += 1; this.insertRows.Add(this.neuSpread1_Sheet1.RowCount - 1); this.isDirty = true; this.inited = true; ReportPrint reportPrint = new ReportPrint(); this.neuSpread1_Sheet1.Rows[this.neuSpread1_Sheet1.RowCount - 1].Tag = reportPrint; return(0); }
/// <summary> /// 更新时的构造函数 /// </summary> /// <param name="resoucesTypes"></param> public frmMaintenacePop(ReportPrint reportPrint, List <Neusoft.FrameWork.Models.NeuObject> resoucesTypes, Dictionary <string, string> resourceTypesMapping1) { judgeOperation = 1; currentReportPrint = reportPrint; resoucesTypeList = resoucesTypes; resourceTypesMapping = resourceTypesMapping1; dicReportPrintControl = new Dictionary <string, ReportPrintControl>(); foreach (ReportPrintControl r in reportPrint.ReportPrintControls) { dicReportPrintControl.Add(r.InterfaceName, r); } InitializeComponent(); Neusoft.FrameWork.WinForms.Classes.Function.SetFarPointStyle(fpSpread_Info); this.BackColor = Neusoft.FrameWork.WinForms.Classes.Function.GetSysColor(EnumSysColor.Blue); InitUpateInfo(); }
public JsonResult GetPharSalesPrint(ReportPrint aPrint) { int invN = 0; if (aPrint.Id == 0) { int idN = Convert.ToInt32(_salesGateway.ReturnFieldValue("tbl_PHAR_SALES_MASTER", "", "MAX(Id)")); invN = Convert.ToInt32(_salesGateway.ReturnFieldValue("tbl_PHAR_SALES_MASTER", " Id=" + idN + " ", "InvoiceNo")); } else { invN = aPrint.Id; } _salesGateway.PrintReportPhar("PharMedicineSales.rpt", "VW_PHAR_MEDICINE_SALES", "WHERE InvoiceNo='" + invN + "'", "VW_PHAR_MEDICINE_SALES", "Invoice", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); var formatter = RequestFormat.JsonFormaterString(); return(Json("", JsonRequestBehavior.AllowGet)); }
private void neuSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e) { this.GetInterfaceNames(e.Row); ReportPrint reportPrint = this.neuSpread1_Sheet1.Rows[e.Row].Tag as ReportPrint; reportPrint.ContainerContorl = this.neuSpread1_Sheet1.Cells[e.Row, 1].Text; if (reportPrint.ReportPrintControls.Count == 0) { for (int j = 0; j < this.neuSpread2_Sheet1.RowCount; j++) { ReportPrintControl reportPrintControl = new ReportPrintControl(); reportPrint.ReportPrintControls.Add(reportPrintControl); this.neuSpread2_Sheet1.Rows[j].Tag = reportPrintControl; } } }
private void tsmiPrint_Click(object sender, EventArgs e) { GridRow gridRow = superGridControl1.PrimaryGrid.ActiveRow as GridRow; if (gridRow == null) { return; } CmcsGoodsTransport entity = gridRow.DataItem as CmcsGoodsTransport; if (entity != null) { if (entity.IsFinish == 0) { if (MessageBoxEx.Show("流程未完结,是否需要打印磅单!", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) == System.Windows.Forms.DialogResult.Cancel) { return; } } ReportPrint.GetInstance().PrintGoodsTransport(entity); } }
public string Index(ReportPrint aPrint) { string lcCondition = ""; switch (aPrint.ReportFileName) { case "DiagnosisInvoiceLedger": lcCondition = "69,'" + aPrint.DateFrom + "','" + aPrint.DateTo + "'," + aPrint.RegId + ""; _db.PrintReport("DiagnosisInvoiceLedger.rpt", "SP_GET_INVOICE_LEDGER", lcCondition, "SP_GET_INVOICE_LEDGER", "Invoice Ledger", "Reporting date from " + aPrint.DateFrom + " to " + aPrint.DateTo, "S"); break; case "DiagnosisDueInvoice": lcCondition = "WHERE SubSubPnoId=69"; if (aPrint.RegId != 0) { lcCondition += "AND RegId=" + aPrint.RegId + ""; } _db.PrintReport("DueInvoiceList.rpt", "VW_DUE_INVOICE_LIST", lcCondition, "VW_DUE_INVOICE_LIST", "Due Invoice List", "", "V"); break; case "DatewiseCollectionReport": lcCondition = "WHERE TrDate Between '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' AND SubSubPnoId=69 Order By Id"; if (aPrint.RegId != 0) { lcCondition += "AND RegId=" + aPrint.RegId + ""; } _db.PrintReport("DatewiseCollection.rpt", "VW_GET_DATEWISE_COLLECTION", lcCondition, "VW_GET_DATEWISE_COLLECTION", "Datewise Collection", "Reporting date from " + aPrint.DateFrom + " to " + aPrint.DateTo, "V"); break; case "SalesLedgerSummarized": lcCondition = "'" + aPrint.DateFrom + "','" + aPrint.DateTo + "'," + aPrint.RegId + ""; _db.PrintReport("SalesLedgerSummarized.rpt", "SP_GET_INVOICE_LEDGER", lcCondition, "SP_GET_INVOICE_LEDGER", "Invoice Ledger", "Reporting date from " + aPrint.DateFrom + " to " + aPrint.DateTo, "S"); break; } return(""); }
private void PrintBill2(string orderid) { ReportPrint.PrintPayBill2(orderid, Globals.UserInfo.UserName); }
private void btnRePrintClear_Click(object sender, EventArgs e) { // ReportPrint.PrintClearMachine(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Globals.ProductVersion = Application.ProductVersion; frmStart.ShowStart(); frmStart.frm.setMsg("程序初始化..."); ReportViewWindow.Instance.Init(); Application.ThreadException += Application_ThreadException;//捕获系统所产生的异常。 Application.ApplicationExit += Application_ApplicationExit; Process instance = RunningInstance(); if (instance != null)//已经有一个实例在运行 { HandleRunningInstance(instance); return; } SystemConfig.ReadSettings(); //读取用户自定义设置 BonusSkins.Register(); //注册Dev酷皮肤 //OfficeSkins.Register();////注册Office样式的皮肤 SkinManager.EnableFormSkins(); //启用窗体支持换肤特性 RestClient.GetSoapRemoteAddress(); ReportPrint.Init(); frmStart.frm.setMsg("获取系统设置..."); try { RestClient.getSystemSetData(out Globals.roundinfo); } catch { // ignored } frmStart.frm.setMsg("获取营业时间..."); IRestaurantService service = new RestaurantServiceImpl(); try { var result = service.GetRestaurantTradeTime(); if (!string.IsNullOrEmpty(result.Item1)) { frmBase.Warning(result.Item1); return; } Globals.TradeTime = result.Item2; } catch (Exception) { // ignored } frmStart.frm.setMsg("检查之前是否结业..."); Application.DoEvents(); var endworkResult = service.CheckWhetherTheLastEndWork(); if (!string.IsNullOrEmpty(endworkResult.Item1)) { frmBase.Warning(endworkResult.Item1); return; } if (!endworkResult.Item2)//未结业走强制结业流程。 { var allTableResult = service.GetAllTableInfoes(); if (!string.IsNullOrEmpty(allTableResult.Item1)) { frmBase.Warning(allTableResult.Item1); return; } if (allTableResult.Item2.Any(t => t.TableStatus == EnumTableStatus.Dinner))//还有就餐的餐台,就让收银员登录,结账。 { frmBase.Warning("昨日还有未结账餐台,请先登录收银员账号并结账,然后进行清机和结业。"); while (true) { var loginResult = CashierLogin(); if (!loginResult.HasValue) { frmBase.Warning("请登录收银员账号以便结账餐台。"); continue; } if (!loginResult.Value)//取消登录。 { return; } MainForm.Show(); MainForm.SetInForcedEndWorkModel(); Application.Run(); return; } } if (!CommonHelper.ClearAllMachine(true)) { return; } frmBase.Warning("昨日还有未结业,请先结业。"); CommonHelper.EndWork(); return; } //如果还没有开业,提示开业授权 string reinfo = ""; frmStart.frm.setMsg("检查是否开业..."); try { if (!RestClient.OpenUp("", "", 0, out reinfo)) { try { //FrmStartFlash.Instance.Close(); frmStart.frm.Close(); } catch { } if (!frmPermission.ShowPermission()) { Application.Exit(); return; } else { //经理权限开业 if (!frmPermission2.ShowPermission2("开业经理授权", EnumRightType.OpenUp)) { Application.Exit(); return; } } } } catch (Exception ex) { Msg.ShowException(ex); Application.Exit(); return; } //注意:先打开登陆窗体,登陆成功后正式运行程序(MDI主窗体) frmStart.frm.setMsg("开始登录..."); if (frmLogin.Login()) { //如果没有收银权限,那不用输入零找金 if (Globals.userRight.getSyRigth()) { if (!frmPosMainV3.checkInputTellerCash()) { Application.Exit(); return; } } Program.MainForm.Show(); Application.Run(); } else//登录失败,退出程序 { Application.Exit(); } }
public string GetReportView(ReportPrint aPrint) { //string lcCondition = ""; switch (aPrint.ReportId) { case "StockSummary": string lcCondition = "where 1=1 AND EntryDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' "; if (aPrint.CompanyId != 0) { lcCondition += "And supplierId=" + aPrint.CompanyId + " "; } if (aPrint.ProductId != 0) { lcCondition += "And ProductId=" + aPrint.ProductId + " "; } if (aPrint.CatagoryId != 0) { lcCondition += "And catagoryId=" + aPrint.CatagoryId + " "; } if (aPrint.PnoId != 0) { lcCondition += "And PnoId=" + aPrint.PnoId + " "; } _gt.PrintReportHr("InvStockSummaryReport.rpt", "VW_INVSTOCK_StockSummary_Report", lcCondition, "VW_INVSTOCK_StockSummary_Report", "Stock Summary Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); break; case "StockBalance": string lcCondition2 = "where 1=1 AND EntryDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' "; //if (aPrint.CompanyId != 0) //{ // lcCondition2 += "And supplierId=" + aPrint.CompanyId + " "; //} if (aPrint.ProductId != 0) { lcCondition2 += "And ProductId=" + aPrint.ProductId + " "; } if (aPrint.CatagoryId != 0) { lcCondition2 += "And catagoryId=" + aPrint.CatagoryId + " "; } if (aPrint.PnoId != 0) { lcCondition2 += "And PnoId=" + aPrint.PnoId + " "; } _gt.PrintReportHr("InvStockBalanceReport.rpt", "VW_INVSTOCK_Balance_report", lcCondition2, "VW_INVSTOCK_Balance_report", "Stock Balance Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); break; case "StockIn": string lcCondition3 = "where 1=1 AND EntryDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' "; //if (aPrint.CompanyId != 0) //{ // lcCondition2 += "And supplierId=" + aPrint.CompanyId + " "; //} //if (aPrint.ProductId != 0) //{ // lcCondition2 += "And ProductId=" + aPrint.ProductId + " "; //} //if (aPrint.CatagoryId != 0) //{ // lcCondition2 += "And catagoryId=" + aPrint.CatagoryId + " "; //} //if (aPrint.PnoId != 0) //{ // lcCondition2 += "And PnoId=" + aPrint.PnoId + " ";StockLedger //} _gt.PrintReportHr("InvStockReceivedReport.rpt", "VW_INVSTOCK_Received", lcCondition3, "VW_INVSTOCK_Received", "Stock Received Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); break; case "StockLedger": string lcCondition4 = "where 1=1 AND EntryDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' "; //if (aPrint.CompanyId != 0) //{ // lcCondition2 += "And supplierId=" + aPrint.CompanyId + " "; //} if (aPrint.ProductId != 0) { lcCondition4 += "And ProductId=" + aPrint.ProductId + " "; } if (aPrint.CatagoryId != 0) { lcCondition4 += "And catagoryId=" + aPrint.CatagoryId + " "; } if (aPrint.PnoId != 0) { lcCondition4 += "And PnoId=" + aPrint.PnoId + " "; } _gt.PrintReportHr("InvStockLedgerReport.rpt", "VW_INVSTOCK_Ledger_Report", lcCondition4, "VW_INVSTOCK_Ledger_Report", "Stock Ledger Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); break; //case "ExpiredItemList": // string firstCond = " WHERE BranchId=" + _branchId + " "; // string secondCond = ""; // if (aPrint.ComId != 0) { secondCond = " AND CompanyId=" + aPrint.ComId + " "; } // string lcCondition = firstCond + secondCond + " AND ExpireDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' "; // _salesGateway.PrintReportPhar("PharExpiredItemList.rpt", "VW_PHAR_EXPIRED_ITEM_LIST", lcCondition, "VW_PHAR_EXPIRED_ITEM_LIST", "Expired Item Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); // break; //case "PurchaseLedgerSummary": // int comId = 0; // if (aPrint.ComId != 0) { comId = aPrint.ComId; } // lcCondition = " '" + aPrint.DateFrom + "','" + aPrint.DateTo + "' ," + comId + "," + _branchId + " "; // _salesGateway.PrintReportPhar("PharPurchaseLedgerSummary.rpt", "SP_PURCHASE_LEDGER_SUMMARY", lcCondition, "SP_PURCHASE_LEDGER_SUMMARY", "Purchase Ledger Summary Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "S"); // break; //case "ReminderStockByCompany": // lcCondition = " WHERE BranchId=" + _branchId + " "; // if (aPrint.ComId != 0) { lcCondition = lcCondition + " AND CompanyId=" + aPrint.ComId + " "; } // _salesGateway.PrintReportPhar("PharReminderStockByCom.rpt", "VW_PHAR_REMINDERSTOCK_BY_COM", lcCondition, "VW_PHAR_REMINDERSTOCK_BY_COM", " Reminder Stock Company Wise Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); // break; //case "SalesCollectionByUser": // lcCondition = " WHERE trDate BETWEEN '" + aPrint.DateFrom + "' AND '" + aPrint.DateTo + "' AND BranchId=" + _branchId + " ORDER BY TrDate "; // _salesGateway.PrintReportPhar("PharSalesCollectionByUser.rpt", "VW_PHAR_SALES_AND_COLL_BY_USER", lcCondition, "VW_PHAR_SALES_AND_COLL_BY_USER", " Sales Collection Report ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); // break; //case "InvoiceRegisterPurchase": // secondCond = ""; // if (aPrint.ComId != 0) { secondCond = " AND CompanyId=" + aPrint.ComId + " "; } // lcCondition = " WHERE BranchId=" + _branchId + " " + secondCond + " ORDER BY ItemName "; // _salesGateway.PrintReportPhar("PharInvoiceRegisterPurchase.rpt", "VW_PHAR_INVOICE_REGISTER_PURCHASE", lcCondition, "VW_PHAR_INVOICE_REGISTER_PURCHASE", "Invoice Register Purchase ", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); // break; //case "CurrentStockPosition": // lcCondition = " WHERE BranchId=" + _branchId + " ORDER BY Name ASC "; // _salesGateway.PrintReportPhar("PharCurrentStockPosition.rpt", "VW_PHAR_CURRENT_STOCK_POSITION", lcCondition, "VW_PHAR_CURRENT_STOCK_POSITION", "Current Stock Position", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "V"); // break; //case "PurchaseLedger": // lcCondition = " '" + aPrint.DateFrom + "','" + aPrint.DateTo + "' ," + aPrint.ComId + "," + _branchId + " "; // _salesGateway.PrintReportPhar("PharPurchaseLedger.rpt", "SP_PHAR_PURCHASE_LEDGER", lcCondition, "SP_PHAR_PURCHASE_LEDGER", "Purchase Ledger", "Reporting Date From " + aPrint.DateFrom + " to " + aPrint.DateTo + " ", "S"); // break; case "NEWSWITCH": break; } return(""); }