Exemplo n.º 1
0
        /// <summary>
        /// 窗体LOAD事件,初始化日期,和网格
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frmtitle_Load(object sender, System.EventArgs e)
        {
            this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
            this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

            FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");
            Yp.AddcmbCk(true, InstanceForm.BCurrentDept.DeptId, cmbck, InstanceForm.BDatabase);


            if ((_menuTag.Function_Name == "Fun_ts_yk_cgrk_yf" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th_yf" || _menuTag.Function_Name == "Fun_ts_yk_cgrk_yf_cx" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th_yf_cx") && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == true)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
            }

            if ((_menuTag.Function_Name == "Fun_ts_yk_cgrk" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th" || _menuTag.Function_Name == "Fun_ts_yk_cgrk_cx" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th_cx") && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == false)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
            }

            if (_menuTag.Function_Name == "Fun_ts_yk_cgrk_yf_cx" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th_yf_cx" ||
                _menuTag.Function_Name == "Fun_ts_yk_cgrk_cx" || InstanceForm._menuTag.Function_Name == "Fun_ts_yk_cgrk_th_cx")
            {
                butnew.Visible = false;
            }

            YpConfig ss = new YpConfig(Convert.ToInt32(Convertor.IsNull(cmbck.SelectedValue, "0")), InstanceForm.BDatabase);

            if (ss.采购入库单显示批发价和批发金额 == true)
            {
                dataGridTextBoxColumn19.Width = 60;
            }
        }
Exemplo n.º 2
0
        private void Frmtitle_Load(object sender, System.EventArgs e)
        {
            this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
            this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

            FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");
            Yp.AddcmbCk(true, InstanceForm.BCurrentDept.DeptId, cmbck, InstanceForm.BDatabase);

            FunctionControlEnable(_menuTag.Function_Name.Trim());
        }
Exemplo n.º 3
0
        //private bool bpcgl = false;//是否进行批次管理


        public Frmtitle(MenuTag menuTag, string chineseName, Form mdiParent)
        {
            //
            // Windows 窗体设计器支持所必需的
            //
            InitializeComponent();
            _menuTag     = menuTag;
            _chineseName = chineseName;
            _mdiParent   = mdiParent;
            this.Text    = _chineseName;
            this.Text    = this.Text + " [" + InstanceForm._menuTag.Jgbm + "]";
            Yp.AddcmbCk(true, InstanceForm.BCurrentDept.DeptId, cmbck, InstanceForm.BDatabase);
            //
            // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            //
        }
Exemplo n.º 4
0
        private void Frmtitle_Load(object sender, System.EventArgs e)
        {
            this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
            this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

            //初始化
            DataTable myTb = new DataTable();

            myTb.TableName = "Tb";
            for (int i = 0; i <= this.myDataGrid1.TableStyles[0].GridColumnStyles.Count - 1; i++)
            {
                if (this.myDataGrid1.TableStyles[0].GridColumnStyles[i].GetType().ToString() == "System.Windows.Forms.DataGridBoolColumn")
                {
                    myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.Int16"));
                }
                else
                {
                    myTb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.String"));
                }

                this.myDataGrid1.TableStyles[0].GridColumnStyles[i].MappingName = this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText;
                this.myDataGrid1.TableStyles[0].GridColumnStyles[i].NullText    = "";
            }
            this.myDataGrid1.DataSource = myTb;
            this.myDataGrid1.TableStyles[0].MappingName = "Tb";

            Yp.AddcmbCk(true, InstanceForm.BCurrentDept.DeptId, cmbck, InstanceForm.BDatabase);


            if (_menuTag.Function_Name == "Fun_ts_yf_cgjh" && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == true)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
                butdel.Enabled = false;
            }

            if (_menuTag.Function_Name == "Fun_ts_yk_cgjh" && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == false)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
                butdel.Enabled = false;
            }
        }
Exemplo n.º 5
0
        private void Frmscjh_Load(object sender, EventArgs e)
        {
            #region 添加业务类型
            string    ssql   = " select '001' code,  '制剂计划' name union select '002' code, '加工计划' name ";
            DataTable dtYwlx = db.GetDataTable(ssql);
            cmbYwlx.ValueMember   = "code";
            cmbYwlx.DisplayMember = "name";
            cmbYwlx.DataSource    = dtYwlx;
            #endregion

            if (_menuTag.Function_Name == "Fun_ts_yp_scjh_zj")
            {
                cmbYwlx.SelectedValue = "001"; //制剂
            }
            else
            {
                cmbYwlx.SelectedValue = "002"; //加工
            }

            Yp.AddcmbCk(true, InstanceForm.BCurrentDept.DeptId, cmbck, InstanceForm.BDatabase);
            butref_Click(0, e);
        }