Exemplo n.º 1
0
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>


        private void Frmxspm_Load(object sender, System.EventArgs e)
        {
            try
            {
                dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                //初始化
                FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");

                this.rdo1.Checked = true;

                Yp.AddCmbYjks(false, InstanceForm.BCurrentDept.DeptId, cmbyjks, InstanceForm.BDatabase);

                Yp.AddcmbYear(Convert.ToInt32(cmbyjks.SelectedValue), cmbyear, InstanceForm.BDatabase);
                Yp.AddCmbLyks(Convert.ToInt32(cmbyjks.SelectedValue), cmblyks, true, InstanceForm.BDatabase);
                cmblyks.Text = "全部";
            }
            catch (System.Exception err)
            {
                MessageBox.Show("发生错误" + err.Message);
            }
        }