public UCReportedLossBillAddOrEdit(WindowStatus state, string LossId, UCReportedLossBillManager UCLosManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCLossBM = UCLosManager;//获取报损单管理类
            this.status = state;//获取操作状态
            this.StockLossId = LossId;//报损单ID
            base.SaveEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCReportedLossBillAddOrEdit_ImportEvent);//导入
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != counts.Name&&dgCol.Name!=remarks.Name) dgCol.ReadOnly = true;
            }
            gvPartsMsgList.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(gvPartsMsgList_HeadCheckChanged); //复选框标题显示为复选框状态 


            base.btnExport.Visible = false;
            base.btnConfirm.Visible = false;
            base.btnEdit.Visible = false;
            base.btnBalance.Visible = false;
            base.btnPrint.Visible = false;

        }
        public UCReportedLossBillAddOrEdit(WindowStatus state, string LossId, UCReportedLossBillManager UCLosManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCLossBM = UCLosManager;//获取报损单管理类
            this.status = state;//获取操作状态
            this.StockLossId = LossId;//报损单ID
            base.SaveEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCReportedLossBillAddOrEdit_ImportEvent);//导入
            gvPartsMsgList.ReadOnly = false;
            ID.ReadOnly = true;
            partsnum.ReadOnly = true;
            partname.ReadOnly = true;
            PartSpec.ReadOnly = true;
            drawingnum.ReadOnly = true;
            UntName.ReadOnly = true;
            partbrand.ReadOnly = true;
            CarFactoryCode.ReadOnly = true;
            BarCode.ReadOnly = true;
            Unitprice.ReadOnly = true;
            Calcmoney.ReadOnly = true;
            //MakDate.ReadOnly = true;
            //ValDate.ReadOnly = true;

            base.btnExport.Enabled = false;
            base.btnConfirm.Enabled = false;
            base.btnEdit.Enabled = false;
            base.btnBalance.Enabled = false;
            base.btnPrint.Enabled = false;

        }
        public UCReportedLossBillAddOrEdit(WindowStatus state, string LossId, UCReportedLossBillManager UCLosManager)
        {
            InitializeComponent();
            counts.ValueType = typeof(decimal);//初始化数量值类型
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCLossBM = UCLosManager;//获取报损单管理类
            this.status = state;//获取操作状态
            this.StockLossId = LossId;//报损单ID
            base.SaveEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SaveEvent);//保存
            base.DeleteEvent += new ClickHandler(UCReportedLossBillAddOrEdit_DeleteEvent);
            base.SubmitEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCReportedLossBillAddOrEdit_ImportEvent);//导入
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != WhName.Name && dgCol.Name != counts.Name && dgCol.Name != remarks.Name) dgCol.ReadOnly = true;
            }
            if (status == WindowStatus.Add || status == WindowStatus.Copy)
            { base.SetButtonVisiableHandleAddCopy(); }
            else if (status == WindowStatus.Edit)
            { base.SetButtonVisiableHandleEdit(); }

        }
Пример #4
0
 private void picBsd_Click(object sender, EventArgs e)
 {
     UCReportedLossBillManager uc = new UCReportedLossBillManager();
     string tag = "CL_AccessoriesBusiness|CL_StockManagement_Function|CL_ReportedLossBill_Function";
     UCBase.AddUserControl(uc, "报损单", "CL_ReportedLossBill_Function", tag, "");
 }