private void CustomMainForm_Load(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                labelTitle.Text          = _Enum_BillType.ToString();
                cmbVersion.DataSource    = _ServiceFlow.GetBusinessInfoVersion(_Enum_BillType);
                cmbVersion.SelectedIndex = 0;
                m_billMessageServer      = BasicServerFactory.GetServerModule <IBillMessagePromulgatorServer>();

                checkBillDateAndStatus1.cmbBillStatus.Items.Clear();
                checkBillDateAndStatus1.InsertComBox(_ServiceFlow.GetBusinessStatus(_Enum_BillType, cmbVersion.Text));
                checkBillDateAndStatus1.InitDateTime();
                m_billNoControl = new BillNumberControl(_Enum_BillType.ToString(), _BusinessService as IBasicBillServer);
                m_billMessageServer.BillType = _Enum_BillType.ToString();

                foreach (TabPage tp in tabControl1.TabPages)
                {
                    foreach (Control cl in tp.Controls)
                    {
                        if (cl is CustomDataGridView)
                        {
                            ((CustomDataGridView)cl).DoubleClick += new EventHandler(dataGridView_DoubleClick);
                            ((CustomDataGridView)cl).CellEnter   += new DataGridViewCellEventHandler(CustomMainForm_CellEnter);
                        }
                    }
                }

                RefreshData(tabControl1.SelectedTab);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取新建单据号
        /// </summary>
        /// <returns>返回获取到的单据号</returns>
        public String GetNewBillNo(DepotManagementDataContext dataContxt)
        {
            string billNo = "";
            bool   bFind  = false;

            for (int i = 0; i < m_lstNewBillId.Count; i++)
            {
                if (!m_billServer.IsExist(dataContxt, m_lstNewBillId[i]))
                {
                    // 使用旧单据
                    bFind  = true;
                    billNo = m_lstNewBillId[i];
                }
                else
                {
                    m_lstNewBillId.RemoveAt(i);
                    i--;
                }
            }

            if (!bFind)
            {
                billNo = m_assignBill.AssignNewNo(dataContxt, m_billServer, m_billType.ToString());
                m_lstNewBillId.Add(billNo);
            }

            return(billNo);
        }
Beispiel #3
0
        public List <BASE_IntegrationReport> GetBusinessSelect(CE_BillTypeEnum billType)
        {
            string error = "";
            List <BASE_IntegrationReport> listReport = new List <BASE_IntegrationReport>();

            Hashtable hsTable = new Hashtable();

            hsTable.Add("@BusineesName", billType.ToString());

            DataTable dtTemp = GlobalObject.DatabaseServer.QueryInfoPro("BASE_IntegrationReport_GetBusinessSelect", hsTable, out error);

            if (dtTemp != null || dtTemp.Rows.Count > 0 || dtTemp.Rows[0][0].ToString().Trim().Length > 0)
            {
                foreach (DataRow dr in dtTemp.Rows)
                {
                    BASE_IntegrationReport report = new BASE_IntegrationReport();

                    report.FindType      = dr["FindType"].ToString();
                    report.PrintName     = dr["PrintName"].ToString();
                    report.ProcedureName = dr["ProcedureName"].ToString();
                    report.ReportCode    = dr["ReportCode"].ToString();
                    report.ReportName    = dr["ReportName"].ToString();

                    listReport.Add(report);
                }
            }

            return(listReport);
        }
        public static void BusinessDataSelect(CE_BillTypeEnum billType)
        {
            try
            {
                string error = "";
                ServerModule.IReport reportService = ServerModule.ServerModuleFactory.GetServerModule <ServerModule.IReport>();

                List <BASE_IntegrationReport> listReport = reportService.GetBusinessSelect(billType);

                if (listReport != null && listReport.Count > 0)
                {
                    FormDataComboBox frmCombox = new FormDataComboBox((from a in listReport select a.ReportName).ToList(),
                                                                      billType.ToString() + "报表查询");

                    if (frmCombox.ShowDialog() == DialogResult.OK)
                    {
                        string    reportCode = (from a in listReport where a.ReportName == frmCombox.Result select a.ReportCode).Single().ToString();
                        DataTable dtSoucre   = reportService.QueryInfo(reportCode, null, out error);

                        FormConditionDataTableFind frmShow = new FormConditionDataTableFind(dtSoucre);
                        frmShow.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
            }
        }
        public static void BusinessDataSelect(CE_BillTypeEnum billType, string keyName,
                                              GlobalObject.DelegateCollection.ShowDataGirdViewInfo formShow)
        {
            try
            {
                string error = "";
                _FormShow = formShow;
                ServerModule.IReport          reportService = ServerModule.ServerModuleFactory.GetServerModule <ServerModule.IReport>();
                List <BASE_IntegrationReport> listReport    = reportService.GetBusinessSelect(billType);

                if (listReport != null && listReport.Count > 0)
                {
                    FormDataComboBox frmCombox = new FormDataComboBox((from a in listReport select a.ReportName).ToList(),
                                                                      billType.ToString() + "报表查询");

                    if (frmCombox.ShowDialog() == DialogResult.OK)
                    {
                        string reportCode = (from a in listReport
                                             where a.ReportName == frmCombox.Result
                                             select a.ReportCode).Single().ToString();

                        List <BASE_IntegrationReportList> list = reportService.GetIntegrationReportList(reportCode);
                        DataTable listInfo = null;

                        if (list != null && list.Count() > 0)
                        {
                            FormValueSet frm = new FormValueSet(list);

                            if (frm.ShowDialog() != DialogResult.OK)
                            {
                                return;
                            }

                            listInfo = new DataTable();

                            listInfo.Columns.Add("参数类型");
                            listInfo.Columns.Add("查询内容");
                            listInfo.Columns.Add("参数名");

                            for (int i = 0; i < frm.Result.Count(); i++)
                            {
                                DataRow dr = listInfo.NewRow();

                                dr["参数名"]  = list[i].ParameterName;
                                dr["参数类型"] = frm.Result[i].ParameterType;
                                dr["查询内容"] = frm.Result[i].ReportCode;

                                listInfo.Rows.Add(dr);
                            }
                        }

                        DataTable dtSoucre = reportService.QueryInfo(reportCode, listInfo, out error);

                        FormConditionDataTableFind frmShow = new FormConditionDataTableFind(dtSoucre, keyName);
                        frmShow.FormShow += new DelegateCollection.ShowDataGirdViewInfo(frmShow_FormShow);
                        frmShow.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 获得所有单据信息
        /// </summary>
        /// <param name="billTypeEnum">单据类型</param>
        /// <returns>返回Table</returns>
        public DataTable GetAllBill(CE_BillTypeEnum billTypeEnum)
        {
            string strSql = "select * from View_FM_InstitutionProcess where 流程类型名称 = '" + billTypeEnum.ToString()
                            + "' and " + QueryResultFilter;

            return(GlobalObject.DatabaseServer.QueryInfo(strSql));
        }