public override void AddRowButtonClick()
        {
            LossResultDto        loss     = new LossResultDto();
            List <LossResultDto> lossList = grcLossReg.DataSource as List <LossResultDto>;
            int seqNO = 0;

            if (lossList == null || lossList.Count == 0)
            {
                loss.LossCode = Convert.ToString(1);
            }
            else
            {
                foreach (LossResultDto inp in lossList)
                {
                    if (Convert.ToInt32(inp.LossCode) > seqNO)
                    {
                        seqNO = Convert.ToInt32(inp.LossCode);
                    }
                }
            }
            loss.LossCode   = (seqNO + 1).ToString();
            loss.InDateTime = DateTime.Now;
            loss.InUserID   = "sysadmin";
            dataHandler.AddRow(loss);
        }
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            FileAndPictureDto        file     = new FileAndPictureDto();
            List <FileAndPictureDto> fileList = grcShopFile.DataSource as List <FileAndPictureDto>;
            int seqNO = 0;

            if (fileList == null || fileList.Count == 0)
            {
                file.SeqNO = 1;
            }
            else
            {
                foreach (FileAndPictureDto inp in fileList)
                {
                    if (inp.SeqNO > seqNO)
                    {
                        seqNO = inp.SeqNO;
                    }
                }
            }
            file.SeqNO       = seqNO + 1;
            file.ProjectCode = projectCode;
            file.SubjectCode = subjectCode;
            file.FileType    = "01";
            dataHandler.AddRow(file);
        }
Esempio n. 3
0
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            InspectionStandardDto        inspection     = new InspectionStandardDto();
            List <InspectionStandardDto> inspectionList = grcInspectionStandard.DataSource as List <InspectionStandardDto>;
            int seqNO = 0;

            if (inspectionList == null || inspectionList.Count == 0)
            {
                inspection.SeqNO = 1;
            }
            else
            {
                foreach (InspectionStandardDto inp in inspectionList)
                {
                    if (inp.SeqNO > seqNO)
                    {
                        seqNO = inp.SeqNO;
                    }
                }
            }
            inspection.SeqNO       = seqNO + 1;
            inspection.ProjectCode = projectCode;
            inspection.SubjectCode = subjectCode;
            dataHandler.AddRow(inspection);
        }
Esempio n. 4
0
        public override void AddRowButtonClick()
        {
            PositionDto area = new PositionDto();

            area.PositionCode = "0";
            dataHandler.AddRow(area);
        }
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            ScoreSetDto        score     = new ScoreSetDto();
            List <ScoreSetDto> scoreList = grcScoreSet.DataSource as List <ScoreSetDto>;
            int seqNO = 0;

            if (scoreList == null || scoreList.Count == 0)
            {
                score.SeqNO = 1;
            }
            else
            {
                foreach (ScoreSetDto sco in scoreList)
                {
                    if (sco.SeqNO > seqNO)
                    {
                        seqNO = Convert.ToInt32(sco.SeqNO);
                    }
                }
            }
            score.SeqNO       = seqNO + 1;
            score.NotInvolved = true;
            score.InUserID    = this._userID;
            score.InDateTime  = DateTime.Now;
            score.ProjectCode = this._projectCode;
            score.SubjectCode = this._subjectCode;
            dataHandler.AddRow(score);
            btnDeleteRow.Enabled = true;
        }
Esempio n. 6
0
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            SalesConsultantDto        loss           = new SalesConsultantDto();
            List <SalesConsultantDto> inspectionList = grcSaleContant.DataSource as List <SalesConsultantDto>;
            DataSet ds    = service.SearchSalesConsultanMaxSeqNO(CommonHandler.GetComboBoxSelectedValue(cboProject).ToString(), _shopCode);
            int     seqNO = 0;

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                seqNO = Convert.ToInt32(ds.Tables[0].Rows[0]["SeqNO"]);
            }
            if (seqNO == 0)
            {
                loss.SeqNO = 1;
            }
            else
            {
                foreach (SalesConsultantDto inp in inspectionList)
                {
                    if (Convert.ToInt32(inp.SeqNO) > seqNO)
                    {
                        seqNO = inp.SeqNO;
                    }
                }
                loss.SeqNO = seqNO + 1;
            }
            dataHandler.AddRow(loss);
        }
        //add row
        private void button4_Click(object sender, EventArgs e)
        {
            List <NameValue> dataSource = gridControl1.DataSource as List <NameValue>;
            NameValue        nv         = new NameValue("aaa", "111");

            xtraGridDataHandler.AddRow(nv);
        }
Esempio n. 8
0
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            NoticeAttachmentDto dto = new NoticeAttachmentDto();

            dto.StatusType = 'I';
            dataHandler.AddRow(dto);
        }
Esempio n. 9
0
        public override void AddRowButtonClick()
        {
            AreaDto area = new AreaDto();

            area.ProjectCode = CommonHandler.GetComboBoxSelectedValue(cboProjects).ToString();
            dataHandler.AddRow(area);
        }
Esempio n. 10
0
        public override void AddRowButtonClick()
        {
            ShopDto shop = new ShopDto();

            shop.ProjectCode = CommonHandler.GetComboBoxSelectedValue(cboProjects).ToString();
            shop.UseChk      = true;
            dataHandler.AddRow(shop);
        }
Esempio n. 11
0
        private void btnLinkAddRow_Click(object sender, EventArgs e)
        {
            LinkDto link = new LinkDto();

            link.CharterCode = CommonHandler.GetComboBoxSelectedValue(cboChapter).ToString();
            link.CharterName = cboChapter.Text;
            dataHandlerLink.AddRow(link);
        }
Esempio n. 12
0
        private void btnCharterAddRow_Click(object sender, EventArgs e)
        {
            ChapterDto chapter = new ChapterDto();

            chapter.ProjectCode = project.ProjectCode;
            chapter.Weight      = Convert.ToDecimal(0.00);
            dataHandlerChapter.AddRow(chapter);
        }
Esempio n. 13
0
        public override void AddRowButtonClick()
        {
            RoleTypeProgramDto score = new RoleTypeProgramDto();

            score.InUserID     = UserInfoDto.UserID;
            score.InDateTime   = DateTime.Now;
            score.RoleTypeCode = CommonHandler.GetComboBoxSelectedValue(cboRoleType).ToString();
            dataHandler.AddRow(score);
            this.CSParentForm.EnabelButton(ButtonType.DeleteRowButton, true);
        }
        public override void AddRowButtonClick()
        {
            UserInfoDto dto = new UserInfoDto();

            dto.InUserID = UserInfoDto.UserID;
            dto.PSW      = "1234";
            dto.RoleType = CommonHandler.GetComboBoxSelectedValue(cboRoleType).ToString();
            dataHandler.AddRow(dto);
            this.CSParentForm.EnabelButton(ButtonType.DeleteRowButton, true);
        }
Esempio n. 15
0
        public override void AddRowButtonClick()
        {
            if (string.IsNullOrEmpty(btnShopCode.Text))
            {
                CommonHandler.ShowMessage(MessageType.Information, "请选择经销商");
                return;
            }
            ShopUserInfoDto shop = new ShopUserInfoDto();

            shop.ProjectCode = CommonHandler.GetComboBoxSelectedValue(cboProjects).ToString();
            shop.ShopCode    = btnShopCode.Text;
            shop.ShopName    = txtShopName.Text;
            dataHandler.AddRow(shop);
        }
Esempio n. 16
0
        public override void AddRowButtonClick()
        {
            //if (CommonHandler.GetComboBoxSelectedValue(cboSaleBigArea) == null || string.IsNullOrEmpty(CommonHandler.GetComboBoxSelectedValue(cboSaleBigArea).ToString()))
            //{
            //    CommonHandler.ShowMessage(MessageType.Information, "请先选择一个大区");
            //    return;
            //}
            ShopDto shop = new ShopDto();

            shop.SaleBig  = "";
            shop.AfterBig = "";
            shop.UseChk   = true;
            dataHandler.AddRow(shop);
        }
Esempio n. 17
0
        private void btnAddLossDesc_Click(object sender, EventArgs e)
        {
            DataSet ds = service.SearchSalesConsultanExistsChk(CommonHandler.GetComboBoxSelectedValue(cboProject).ToString(), _shopCode, txtSubjectCode.Text,
                                                               Convert.ToString(_fatherSeqNO));

            if (ds.Tables[0].Rows.Count == 0)
            {
                CommonHandler.ShowMessage(MessageType.Information, "请先保存销售信息");
                return;
            }
            if (string.IsNullOrEmpty(txtLossDesc.Text))
            {
                CommonHandler.ShowMessage(MessageType.Information, "请选择失分说明");
                return;
            }
            LossDescDto        loss           = new LossDescDto();
            List <LossDescDto> inspectionList = grcLossDesc.DataSource as List <LossDescDto>;
            int lossCode = 0;

            if (inspectionList == null || inspectionList.Count == 0)
            {
                loss.LossCode = 1;
            }
            else
            {
                foreach (LossDescDto inp in inspectionList)
                {
                    if (Convert.ToInt32(inp.LossCode) > lossCode)
                    {
                        lossCode = inp.LossCode;
                    }
                }
                loss.LossCode = lossCode + 1;
            }
            loss.LossName = txtLossDesc.Text.Trim();
            dataHandler1.AddRow(loss);
        }
Esempio n. 18
0
        private void btnAddRow_Down_Click(object sender, EventArgs e)
        {
            if (CommonHandler.GetComboBoxSelectedValue(cboLink) == null || string.IsNullOrEmpty(CommonHandler.GetComboBoxSelectedValue(cboLink).ToString()))
            {
                CommonHandler.ShowMessage(MessageType.Information, "请先选择环节");
                return;
            }
            SubjectDto subject = new SubjectDto();

            subject.LinkCode    = CommonHandler.GetComboBoxSelectedValue(cboLink).ToString();
            subject.ProjectCode = project.ProjectCode;
            subject.FullScore   = 2;
            subject.ScoreCheck  = true;
            if (cboExamType.SelectedIndex == 0)
            {
                subject.SubjectTypeCodeExam = "C";
            }
            else
            {
                subject.SubjectTypeCodeExam = CommonHandler.GetComboBoxSelectedValue(cboExamType).ToString();
            }

            dataHandlerSubject.AddRow(subject);
        }
        private void btnAddRow_Click(object sender, EventArgs e)
        {
            if (tabControl.SelectedTab == tabPage1)
            {
                LossResultDto inspection = new LossResultDto();
                //List<LossResultDto> inspectionList = grcLossResult1.DataSource as List<LossResultDto>;
                //int seqNO = 0;
                //if (inspectionList == null || inspectionList.Count == 0)
                //{
                //    inspection.LossCode = Convert.ToString(1);
                //}
                //else
                //{

                //    foreach (LossResultDto inp in inspectionList)
                //    {
                //        if (Convert.ToInt32(inp.LossCode) > seqNO)
                //        {
                //            seqNO = Convert.ToInt32(inp.LossCode);
                //        }
                //    }
                //}
                //inspection.LossCode = Convert.ToString(seqNO + 1);
                inspection.ProjectCode = projectCode;
                inspection.SubjectCode = subjectCode;
                dataHandler1.AddRow(inspection);
            }
            else if (tabControl.SelectedTab == tabPage2)
            {
                LossResultDto inspection = new LossResultDto();
                ////List<LossResultDto> inspectionList = grcLossResult2.DataSource as List<LossResultDto>;
                ////int seqNO = 0;
                ////if (inspectionList == null || inspectionList.Count == 0)
                ////{
                ////    inspection.LossCode = Convert.ToString(1);
                ////}
                ////else
                ////{

                ////    foreach (LossResultDto inp in inspectionList)
                ////    {
                ////        if (Convert.ToInt32(inp.LossCode) > seqNO)
                ////        {
                ////            seqNO = Convert.ToInt32(inp.LossCode);
                ////        }
                ////    }
                ////}
                ////inspection.LossCode = Convert.ToString(seqNO + 1);
                inspection.ProjectCode = projectCode;
                inspection.SubjectCode = subjectCode;
                dataHandler2.AddRow(inspection);
            }
            else
            {
                LossResultDto inspection = new LossResultDto();
                //List<LossResultDto> inspectionList = grcLossResult3.DataSource as List<LossResultDto>;
                //int seqNO = 0;
                //if (inspectionList == null || inspectionList.Count == 0)
                //{
                //    inspection.LossCode = Convert.ToString(1);
                //}
                //else
                //{

                //    foreach (LossResultDto inp in inspectionList)
                //    {
                //        if (Convert.ToInt32(inp.LossCode) > seqNO)
                //        {
                //            seqNO = Convert.ToInt32(inp.LossCode);
                //        }
                //    }
                //}
                //inspection.LossCode = Convert.ToString(seqNO + 1);
                inspection.ProjectCode = projectCode;
                inspection.SubjectCode = subjectCode;
                dataHandler3.AddRow(inspection);
            }
        }
Esempio n. 20
0
        public override void AddRowButtonClick()
        {
            ProjectDto project = new ProjectDto();

            dataHandler.AddRow(project);
        }
        public override void AddRowButtonClick()
        {
            dataHandler.AddRow(new ReCheckDto());

            CSParentForm.EnabelButton(ButtonType.DeleteRowButton, true);
        }