Beispiel #1
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormReview_Load(object sender, EventArgs e)
        {
            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            //並び替えができないようにする
            uih.NoSortable();

            uih.DgvColumnsWidth(85);
            uih.DgvColumnsWidth(0, 90);

            dataGridView1.Rows.Add(iniRCnt);
            uih.DgvRowsHeight(26);
            uih.DgvRowsReadOnly(readOnlyRows, Color.PaleGreen);
            uih.DgvRowsReadOnly(readOnlyRowsW, Color.White);
            uih.DgvColumnsReadOnly(readOnlyCells, Color.PaleGreen);

            create_cbOffice();
            create_cbDepart();
            create_cbYM();
            setColumnLimitter();

            setViewData(dataGridView1);
        }
Beispiel #2
0
        private void editAndView(DataGridView dgv, string officeCode, string department)
        {
            StringUtility su = new StringUtility();

            TaskData[] tdWkA = new TaskData[tdA.Length];

            MembersData mbd = new MembersData();
            int         j   = 0;

            for (int i = 0; i < tdA.Length; i++)
            {
                //mbd = new MembersData();
                //mbd = mbd.SelectMembersDataAll( tdA[i].SalesMCode );
                //if( mbd == null ) continue;
                //if( mbd.OfficeCode == officeCode && mbd.Department == department )
                //{
                //    tdWkA[j] = new TaskData();
                //    tdWkA[j] = ( TaskData )tdA[i].Clone();
                //    j++;
                //}
                string wkoffice = su.SubstringByte(tdA[i].TaskBaseCode, 2, 1);
                if (su.SubstringByte(tdA[i].TaskBaseCode, 2, 1) == officeCode)
                {
                    tdWkA[j] = new TaskData();
                    tdWkA[j] = ( TaskData )tdA[i].Clone();
                    j++;
                }
            }

            TaskData[] tdArray = new TaskData[j];
            for (int i = 0; i < j; i++)
            {
                tdArray[i] = new TaskData();
                tdArray[i] = ( TaskData )tdWkA[i].Clone();
            }


            MembersData[] mbdA = mbd.SelectMembersDataAll();
            if (mbdA == null)
            {
                return;
            }
            string[] mCodeArray = new string[mbdA.Length];
            string[] mNameArray = new string[mbdA.Length];
            for (int i = 0; i < mbdA.Length; i++)
            {
                mCodeArray[i] = mbdA[i].MemberCode.TrimEnd();
                mNameArray[i] = mbdA[i].Name.TrimEnd();
            }

            UiHandling uih = new UiHandling(dgv);

            uih.DgvRowsHeight(26);
            dataGridView1.Rows.Add(tdArray.Length);

            for (int i = 0; i < tdArray.Length; i++)
            {
                dgv.Rows[i].Cells["SeqNo"].Value     = i + 1;
                dgv.Rows[i].Cells["TaskCode"].Value  = selTaskCode(tdArray[i], officeCode, department);
                dgv.Rows[i].Cells["TaskName"].Value  = tdArray[i].TaskName;
                dgv.Rows[i].Cells["VersionNo"].Value = tdArray[i].VersionNo;
                dgv.Rows[i].Cells["IssueDate"].Value = (string.IsNullOrEmpty(Convert.ToString(tdArray[i].IssueDate))) ? "" : tdArray[i].IssueDate.ToShortDateString();

                if (tdArray[i].SalesMCode.Trim() == "00")
                {
                    tdArray[i].SalesMCode = null;
                }
                dgv.Rows[i].Cells["SalesMName"].Value      = (string.IsNullOrEmpty(tdArray[i].SalesMCode)) ? "" : mNameArray[Array.IndexOf(mCodeArray, tdArray[i].SalesMCode.TrimEnd())];
                dgv.Rows[i].Cells["SalesMInputDate"].Value = (string.IsNullOrEmpty(Convert.ToString(tdArray[i].SalesMInputDate))) ? "" : tdArray[i].SalesMInputDate.ToShortDateString();

                dgv.Rows[i].Cells["Approval"].Value     = (string.IsNullOrEmpty(tdArray[i].Approval)) ? "" : mNameArray[Array.IndexOf(mCodeArray, tdArray[i].Approval.TrimEnd())];
                dgv.Rows[i].Cells["ApprovalDate"].Value = (string.IsNullOrEmpty(Convert.ToString(tdArray[i].ApprovalDate))) ? "" : tdArray[i].ApprovalDate.ToShortDateString();

                dgv.Rows[i].Cells["MakeOrder"].Value     = (string.IsNullOrEmpty(tdArray[i].Approval)) ? "" : mNameArray[Array.IndexOf(mCodeArray, tdArray[i].MakeOrder.TrimEnd())];
                dgv.Rows[i].Cells["MakeOrderDate"].Value = (string.IsNullOrEmpty(Convert.ToString(tdArray[i].MakeOrderDate))) ? "" : tdArray[i].MakeOrderDate.ToShortDateString();

                dgv.Rows[i].Cells["ConfirmAdm"].Value  = (string.IsNullOrEmpty(tdArray[i].MakeOrder)) ? "" : mNameArray[Array.IndexOf(mCodeArray, tdArray[i].ConfirmAdm.TrimEnd())];
                dgv.Rows[i].Cells["ConfirmDate"].Value = (string.IsNullOrEmpty(Convert.ToString(tdArray[i].ConfirmDate))) ? "" : tdArray[i].ConfirmDate.ToShortDateString();
            }
            rowCount = tdArray.Length;

            labelMsg.Text = comboBoxOffice.Text + "発行の業務引継書で承認が未完了のものを表示しました。";
        }
Beispiel #3
0
        private void editAndView(DataGridView dgv)
        {
            // 社員番号、名テーブル作成
            MembersData mbd = new MembersData();

            MembersData[] mbdA = mbd.SelectMembersDataAll();
            if (mbdA == null)
            {
                return;
            }
            string[] mCodeArray = new string[mbdA.Length];
            string[] mNameArray = new string[mbdA.Length];
            for (int i = 0; i < mbdA.Length; i++)
            {
                mCodeArray[i] = mbdA[i].MemberCode.TrimEnd();
                mNameArray[i] = mbdA[i].Name.TrimEnd();
            }
            // GridView Row設定
            UiHandling uih = new UiHandling(dgv);

            uih.DgvRowsHeight(26);
            dataGridView1.Rows.Add(pdA.Length);
            // GirdViewデータ移送
            for (int i = 0; i < pdA.Length; i++)
            {
                dgv.Rows[i].Cells["SeqNo"].Value     = i + 1;
                dgv.Rows[i].Cells["TaskCode"].Value  = (string.IsNullOrEmpty(pdA[i].TaskCode)) ? "" : pdA[i].TaskCode;
                dgv.Rows[i].Cells["TaskName"].Value  = pdA[i].TaskName;
                dgv.Rows[i].Cells["VersionNo"].Value = pdA[i].VersionNo;
                if (pdA[i].CreateStat == 1)
                {
                    dgv.Rows[i].Cells["CreateMName"].Value = (string.IsNullOrEmpty(pdA[i].CreateMCd)) ? "" : mNameArray[Array.IndexOf(mCodeArray, pdA[i].CreateMCd.TrimEnd())];
                    dgv.Rows[i].Cells["CreateDate"].Value  = (string.IsNullOrEmpty(Convert.ToString(pdA[i].CreateDate))) ? "" : pdA[i].CreateDate.ToShortDateString();
                }

                if (pdA[i].ConfirmStat == 1)
                {
                    dgv.Rows[i].Cells["ConfirmMName"].Value = (string.IsNullOrEmpty(pdA[i].ConfirmMCd)) ? "" : mNameArray[Array.IndexOf(mCodeArray, pdA[i].ConfirmMCd.TrimEnd())];
                    dgv.Rows[i].Cells["ConfirmDate"].Value  = (string.IsNullOrEmpty(Convert.ToString(pdA[i].ConfirmDate))) ? "" : pdA[i].ConfirmDate.ToShortDateString();
                }

                if (pdA[i].ScreeningStat == 1)
                {
                    dgv.Rows[i].Cells["ScreeningMName"].Value = (string.IsNullOrEmpty(pdA[i].ScreeningMCd)) ? "" : mNameArray[Array.IndexOf(mCodeArray, pdA[i].ScreeningMCd.TrimEnd())];
                    dgv.Rows[i].Cells["ScreeningDate"].Value  = (string.IsNullOrEmpty(Convert.ToString(pdA[i].ScreeningDate))) ? "" : pdA[i].ScreeningDate.ToShortDateString();
                }

                if (pdA[i].ApOfficerStat == 1)
                {
                    dgv.Rows[i].Cells["ApOfficerMName"].Value = (string.IsNullOrEmpty(pdA[i].ApOfficerMCd)) ? "" : mNameArray[Array.IndexOf(mCodeArray, pdA[i].ApOfficerMCd.TrimEnd())];
                    dgv.Rows[i].Cells["ApOfficerDate"].Value  = (string.IsNullOrEmpty(Convert.ToString(pdA[i].ApOfficerDate))) ? "" : pdA[i].ApOfficerDate.ToShortDateString();
                }

                if (pdA[i].ApPresidentStat == 1)
                {
                    dgv.Rows[i].Cells["ApPresidentMName"].Value = (string.IsNullOrEmpty(pdA[i].ApPresidentMCd)) ? "" : mNameArray[Array.IndexOf(mCodeArray, pdA[i].ApPresidentMCd.TrimEnd())];
                    dgv.Rows[i].Cells["ApPresidentDate"].Value  = (string.IsNullOrEmpty(Convert.ToString(pdA[i].ApPresidentDate))) ? "" : pdA[i].ApPresidentDate.ToShortDateString();
                }
            }

            labelMsg.Text = comboBoxOffice.Text + "発行の実行予算書で承認が未完了のものを表示しました。";
        }