コード例 #1
0
        private void frmHomePageList_Load(object sender, EventArgs e)
        {
        
              DataSet dsTechAreaDetails = new DataSet();
            try
            {

                //set css begin
                clsCssStyle theStyle = new clsCssStyle();
                theStyle.setStyle(this);
                //set css end
                cmbFormStatus.SelectedIndex = 2;
                objTechArea = (IHomePageConfiguration)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BHomePageConfiguration,BusinessProcess.FormBuilder");
                dsTechAreaDetails = objTechArea.GetTechnicalArea();

                DataTable dt;
                dt = dsTechAreaDetails.Tables[1];
                DataRow drAddSelect;
                drAddSelect = dt.NewRow();
                drAddSelect["ModuleName"] = "All";
                drAddSelect["ModuleID"] = 0;

                dt.Rows.InsertAt(drAddSelect, 0);
                BindFunctions theBind = new BindFunctions();
                theBind.Win_BindCombo(cmbTechnicalArea1, dt, "ModuleName", "ModuleId"); 
                cmbFormStatus.SelectedIndex = 0;
                BindGrid();
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindow("#C1", theBuilder, this);
            }
        }
コード例 #2
0
ファイル: frmHomePage.cs プロジェクト: uon-crissp/IQCare
        private void frmHomePage_Load(object sender, EventArgs e)
        {
            try
            {
                //set css begin
                clsCssStyle theStyle = new clsCssStyle();
                theStyle.setStyle(this);
                //set css end
                bCellClick = false;
                IHomePageConfiguration objTechArea = (IHomePageConfiguration)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BHomePageConfiguration,BusinessProcess.FormBuilder");
                DataSet dsTechAreaDetails          = new DataSet();
                dsTechAreaDetails = objTechArea.GetTechnicalArea();
                BindFunctions theBind = new BindFunctions();
                theBind.Win_BindCombo(cmbTechnicalArea, dsTechAreaDetails.Tables[1], "ModuleName", "ModuleID");
                cmbHomePageType.SelectedIndex = 0;
                DataSet dsIndicatorQuery = new DataSet();
                dsIndicatorQuery = objTechArea.GetIndicatorQueryResult(GblIQCare.iHomePageId);
                if (dsIndicatorQuery.Tables.Count > 1)
                {
                    if (dsIndicatorQuery.Tables[1].Rows.Count > 0)
                    {
                        txtSectionTitle.Text           = dsIndicatorQuery.Tables[1].Rows[0]["FacilityHomeTitle"].ToString();
                        cmbHomePageType.Text           = dsIndicatorQuery.Tables[1].Rows[0]["Feature"].ToString();
                        cmbTechnicalArea.SelectedValue = dsIndicatorQuery.Tables[1].Rows[0]["Module"].ToString();
                        ID = Convert.ToInt32(dsIndicatorQuery.Tables[1].Rows[0]["ID"].ToString());
                    }
                }
                DataColumn theColumn = dsIndicatorQuery.Tables[0].Columns["Indicator"];
                dsIndicatorQuery.Tables[0].Constraints.Add("Pk", theColumn, true);
                if (GblIQCare.iHomePageId != 0)
                {
                    cmbTechnicalArea.Enabled = false;
                    cmbHomePageType.Enabled  = false;
                }
                BindGrid(dsIndicatorQuery.Tables[0]);
            }

            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindow("#C1", theBuilder, this);
                return;
            }
        }