예제 #1
0
        void frmDriverReport_Load(object sender, EventArgs e)
        {
            ComboFunctions.FillCompanyCombo(ddlCompany, c => c.IsAgent != null && c.IsAgent == true);
            ComboFunctions.FillCompanyGroupCombo(ddlGroup);
            ComboFunctions.FillSubCompanyCombo(ddlSubCompany);
            dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue());

            IsLoaded = true;

            // this.TemplatePath = General.GetObject<UM_Form_Template>(c => c.UM_Form.FormName == this.Name && c.IsDefault == true).DefaultIfEmpty().TemplateName.ToStr().Trim();

            //if (this.TemplatePath.ToStr().ToLower() == "template3" || this.TemplatePath.ToStr().ToLower() == "template4")
            //{
            //    chkShowCharges.Visible = true;

            //}
            // chkShowCharges.Visible = true;
            ddlSubCompany.SelectedValue = AppVars.objSubCompany.Id;


            ddlSubCompany.SelectedValueChanged += new EventHandler(ddlSubCompany_SelectedValueChanged);
        }