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

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormInvoice_Load(object sender, EventArgs e)
        {
            this.defaultCellStyle = new DataGridViewCellStyle();
            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            uih.NoSortable();

            DateTime dtNow = DateTime.Now;

            iniRCnt = Convert.ToInt32((dtNow.EndOfMonth()).Day) - 1;
            dataGridView1.Rows.Add(iniRCnt);

            edit_Labels();
            edit_TextBox();
            create_dtPicker();

            // 作業項目マスタの一覧作成
            EstPlanOp ep = new EstPlanOp();

            wid = ep.StoreWorkItemsData(ted.MemberCode);

            initialProcessing(0);

            nowMonth();
        }
Beispiel #2
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

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

            uih.DgvReadyNoRHeader();
            uih.NoSortable();

            uih = new UiHandling(dataGridViewR);
            uih.DgvReadyNoRHeader();
            uih.NoSortable();

            uih = new UiHandling(dataGridViewT);
            uih.DgvReadyNoRHeader();
            uih.NoSortable();

            labelPublisher.Text = ted.OfficeName + ted.DepartName; // 部署名

            create_cbOffice();                                     // 事業所comboBox
            comboBoxOffice.Text = ted.OfficeName;
            create_cbWork();                                       // 部門ComboBox
            comboBoxWork.Text = ted.DepartName;

            ListFormDataOp lo = new ListFormDataOp();

            psd = lo.SelectPartnersScData();

            create_dtPicker();

            edit_Labels();

            initialViewSetting(0);

            nowMonth();
        }
Beispiel #3
0
        private void FormCostList_Load(object sender, EventArgs e)
        {
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // 列幅設定、入力不可設定
            for (int i = 0; i < dataGridView1.ColumnCount; i++)
            {
                dataGridView1.Columns[i].ReadOnly = true;
            }
            //if (cmd.GetLength(0) > 1) dataGridView1.Rows.Add(cmd.GetLength(0) - 1);
            if (cmd.Length > 1)
            {
                dataGridView1.Rows.Add(cmd.Length - 1);
            }
            //for (int i = 0; i < cmd.GetLength(0); i++)
            for (int i = 0; i < cmd.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = cmd[i].CostCode;
                dataGridView1.Rows[i].Cells[1].Value = cmd[i].Item.Replace("(支払い)", "");
                dataGridView1.Rows[i].Cells[2].Value = cmd[i].ItemDetail;
                dataGridView1.Rows[i].Cells[3].Value = cmd[i].Unit;
                dataGridView1.Rows[i].Cells[4].Value = (cmd[i].Cost == 0) ? "": DHandling.DecimaltoStr(cmd[i].Cost, "0.00");
                dataGridView1.Rows[i].Cells[5].Value = cmd[i].CostID;
            }
        }
Beispiel #4
0
        private void FormTaskNameList_Load(object sender, EventArgs e)
        {
            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            // 罫線設定
            dataGridView1.AdvancedCellBorderStyle.Right = DataGridViewAdvancedCellBorderStyle.Single;
            // 列幅設定、入力不可設定
            dataGridView1.Columns[0].ReadOnly = true;
            dataGridView1.Columns[0].Width    = 600;

            // データをdataGridViewにセット
            if (tcd == null)
            {
                return;
            }
            int wkcnt = tcd.Length;

            if (tcd.Length > 1)
            {
                dataGridView1.Rows.Add(tcd.Length);
            }

            for (int i = 0; i < tcd.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = tcd[i].TaskName;
            }
        }
Beispiel #5
0
        private void FormTaskCodeNameList_Load(object sender, EventArgs e)
        {
            // DataGridView 設定
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // データをdataGridViewにセット
            if (tcd == null)
            {
                MessageBox.Show("Dataがありません。");
                return;
            }

            //if (tcd.GetLength(0) > 1) dataGridView1.Rows.Add(tcd.GetLength(0) - 1);
            if (tcd.Length > 1)
            {
                dataGridView1.Rows.Add(tcd.Length - 1);
            }

            //for (int i = 0; i < tcd.GetLength(0); i++)
            for (int i = 0; i < tcd.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = tcd[i].TaskCode;
                dataGridView1.Rows[i].Cells[1].Value = tcd[i].TaskName;
                dataGridView1.Rows[i].Cells[2].Value = Convert.ToString(tcd[i].TaskID);
                dataGridView1.Rows[i].Cells[3].Value = Convert.ToString(tcd[i].TaskIndID);
            }
        }
Beispiel #6
0
        //-----------------------------------------------//
        //      Property
        //-----------------------------------------------//

        //-----------------------------------------------//
        //      Method
        //-----------------------------------------------//
        private void FormCostDetail_Load(object sender, EventArgs e)
        {
            // DataGridViewの列タイトル設定
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvColumnName(2, cif.EditColumnNameArray(cif.Class0, cif.Class1));
            ui.DgvColumnHeader(2, cif.EditColumnHeaderArray(cif.Class0, cif.Class1));

            //原価計上日
            labelFrom.Text = cif.DateSOP.ToString("yyyy/MM/dd");
            labelTo.Text   = cif.DateEOP.ToString("yyyy/MM/dd");

            //明細表
            labelType.Text = cif.ClassificationItem;

            //出力範囲
            labelRange.Text = cif.OutputRange;

            labelOffice.Text = cif.Office;

            // データ読み込み
            string strSql = " D_CR.ReportDate AS ReportDate, D_CR.SlipNo AS SlipNo, D_CR.TaskCode AS TaskCode, SUBSTRING(D_CR.TaskCode, 2, 6) AS TaskBaseCode, D_CR.ItemCode AS ItemCode, D_CR.Quantity AS Quantity,"
                            + " D_CR.Unit AS Unit, D_CR.UnitPrice AS UnitPrice, D_CR.Cost AS Cost ,D_T.PartnerCode AS CustoCode, "
                            + " CASE WHEN LEN(ISNULL(D_CR.LeaderMCode, '')) < 3 THEN RIGHT('00' + RTRIM(ISNULL(D_CR.LeaderMCode, '')), 3) ELSE ISNULL(D_CR.LeaderMCode, '') END AS LeaderMCode, "
                            + " CASE WHEN LEN(ISNULL(D_CR.SalesMCode, '')) < 3 THEN RIGHT('00' + RTRIM(ISNULL(D_CR.SalesMCode, '')), 3) ELSE ISNULL(D_CR.SalesMCode, '') END AS SalesMCode, "
                            //+ " M_C.CostCode AS CostCode, M_C.Item AS Item FROM D_CostReport AS D_CR "
                            + " M_C.CostCode AS CostCode, D_CR.Item AS Item FROM D_CostReport AS D_CR "
                            + " LEFT JOIN M_Cost AS M_C ON D_CR.ItemCode = M_C.CostCode AND D_CR.OfficeCode = M_C.OfficeCode "
                            + " LEFT JOIN D_Task AS D_T ON D_T.TaskBaseCode = SUBSTRING(D_CR.TaskCode, 2, 6) ";

            strSql = strSql + cif.WherePhraseDate;
            displayDetailInformation(dataGridView1, strSql);
        }
Beispiel #7
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

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

            uih.DgvReadyNoRHeader();
            uih.NoSortable();
            uih = new UiHandling(dataGridView2);
            uih.DgvReadyNoRHeader();
            uih.NoSortable();

            // 現在の締日一覧
            //this.clsArray = new DateTime[] { hp.CloseHDate, hp.CloseKDate, hp.CloseSDate, hp.CloseTDate };

            create_cbOffice();
            comboBoxOffice.SelectedIndex = Conv.oList.IndexOf(hp.OfficeCode); // 初期値
            create_cbDepart();
            comboBoxDepart.Text = hp.Department;                              // 初期値
            labelMessage.Text   = "";
            labelItemCode.Text  = "";

            // 事業所コードに応じた業務情報取得表示
            //dispTaskCodeNameList(hp.OfficeCode);
            //dispTaskCodeNameList(hp.OfficeCode,hp.Department);
            // 事業所コードに応じた原価情報取得表示
            //dispCostList(hp.OfficeCode);
        }
Beispiel #8
0
        //--------------------------------------------------------------------------//
        //     Property                                                             //
        //--------------------------------------------------------------------------//

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

            uih.DgvReadyNoRHeader();
            uih.DgvNotSortable(dataGridView1);

            initializeScreen();
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepartment);
        }
Beispiel #9
0
        //-----------------------------------------------//
        //      Property
        //-----------------------------------------------//

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

            ui.DgvReadyNoRHeader();
            ui.DgvColumnsAlignmentRight(3, 29);
            create_cbFY();
            create_cbOffice();
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepart);

            getInformationAboutTask();
        }
Beispiel #10
0
        //--------------------------------------------------------------------------//
        //     Property                                                             //
        //--------------------------------------------------------------------------//

        //--------------------------------------------------------------------------//
        //     Method                                                               //
        //--------------------------------------------------------------------------//
        private void FormInputCostData_Load(object sender, EventArgs e)
        {
            this.defaultCellStyle = new DataGridViewCellStyle();
            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            uih.DgvNotSortable(dataGridView1);

            viewModeProperty();
            //reverseProperty();
            initializeScreen();
            initialDisplay();
            calculateAmount();
        }
Beispiel #11
0
        //---------------------------------------------------------------------
        //      Property
        //---------------------------------------------------------------------
        //---------------------------------------------------------------------
        //      Method
        //---------------------------------------------------------------------
        /// <summary>
        /// フォームロード時
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormVolumeBook_Load(object sender, EventArgs e)
        {
            UiHandling uih = new UiHandling(this.dataGridViewList);

            uih.DgvReadyNoRHeader();
            // 並び替えができないようにする
            //uih.NoSortable();
            // 部署コンボボックス設定
            CreateCbOffice();
            // 部門コンボボックス設定
            CreateCbDepartment();
            // 締め月コンボボックス設定
            CreateCbMonth("Dummy");
            // データグリッドビュー初期表示
            CreateDataGridView();
        }
Beispiel #12
0
        //---------------------------------------------------------------------
        //      Property
        //---------------------------------------------------------------------
        //---------------------------------------------------------------------
        //      Method
        //---------------------------------------------------------------------
        /// <summary>
        /// フォームロード時
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMCostMentL_Load(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;   // マウスカーソルを砂時計(Wait)

            UiHandling uih = new UiHandling(this.dataGridViewList);

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

            // 部署コンボボックス設定
            CreateCbOffice();

            // 原価マスタ表示
            CreateDataGridView();
            CostKeyControl(0);

            Cursor.Current = Cursors.Default;  // マウスカーソルを戻す
        }
Beispiel #13
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

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

            uih.DgvReadyNoRHeader();

            create_cbOffice();
            create_cbDepart();
            labelMsg.Text = "";

            if (dataCollection())
            {
                editAndView(dataGridView1, Convert.ToString(comboBoxOffice.SelectedValue), Convert.ToString(comboBoxDepart.SelectedValue));
            }
            else
            {
                MessageBox.Show("表示できるデータはありません");
                return;
            }
        }
Beispiel #14
0
        //--------------------------------------------------------------------------//
        //     SubRoutine                                                           //
        //--------------------------------------------------------------------------//
        private void initializeScreen()
        {
            labelMessage.Text = "";

            dataGridView1.Rows.Clear();
            dataGridView1.Rows.Add(iniRCnt);
            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            uih.DgvNotSortable(dataGridView1);
            uih.DgvColumnsWrapModeON();

            create_cbOffice();
            comboBoxOffice.Text = hp.OfficeName;
            create_cbDepart();
            comboBoxDepart.Text = hp.DepartName;        // 初期値

            create_cbMonth();

            init_dateTimePicker();
        }
Beispiel #15
0
        private void FormItemList_Load(object sender, EventArgs e)
        {
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // 列幅設定、入力不可設定
            for (int i = 0; i < dataGridView1.ColumnCount; i++)
            {
                dataGridView1.Columns[i].ReadOnly = true;
            }

            dataGridView1.Columns[0].Width = 40;
            dataGridView1.Columns[1].Width = 200;
            dataGridView1.Columns[2].Width = 200;
            dataGridView1.Columns[3].Width = 150;
            dataGridView1.Columns[4].Width = 80;
            dataGridView1.Columns[5].Width = 80;

            //dataGridView1.Rows.Add(wid.GetLength(0));
            dataGridView1.Rows.Add(wid.Length);
            //for (int i = 0; i < wid.GetLength(0); i++)
            for (int i = 0; i < wid.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = wid[i].ItemCode;
                dataGridView1.Rows[i].Cells[1].Value = wid[i].UItem;
                dataGridView1.Rows[i].Cells[2].Value = wid[i].Item;
                dataGridView1.Rows[i].Cells[3].Value = wid[i].ItemDetail;
                dataGridView1.Rows[i].Cells[4].Value = wid[i].Unit;
                if (wid[i].StdCost == 0)
                {
                    dataGridView1.Rows[i].Cells[5].Value = null;
                }
                else
                {
                    dataGridView1.Rows[i].Cells[5].Value = wid[i].StdCost;
                }
            }
        }
Beispiel #16
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormOutsource_Load(object sender, EventArgs e)
        {
            this.defaultCellStyle = new DataGridViewCellStyle();

            UiHandling uih = new UiHandling(dataGridView1);

            uih.DgvReadyNoRHeader();
            uih.NoSortable();
            dataGridView1.Rows.Add(iniRCnt);
            buttonNumbering(dataGridView1);

            create_cbOffice();                  // 事業所comboBox
            create_cbWork();                    // 部門ComboBox
            create_cbPartner();                 // 業者名comboBox
            labelTask.Text = ted.TaskName;      // 業務名Label
            create_lblTerm();                   // 工期
            labelTaskCode.Text = ted.TaskCode;  // 業務番号
            create_cbPayRoule();                // 支払基準comboBox
            edit_tbDeliveryPoint();             // 納品場所初期値

            initialSetbuttonFromPlan();
            initialViewSetting(0);
        }
Beispiel #17
0
        private void FormMembersList_Load(object sender, EventArgs e)
        {
            // DataGridView 設定
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // Wakamatsu
            //if(msd.GetLength(0) > 1)
            if (msd.Length > 1)
            {
                // データをdataGridViewにセット
                //dataGridView1.Rows.Add(msd.GetLength(0) - 1);
                dataGridView1.Rows.Add(msd.Length - 1);
            }
            // Wakamatsu
            //for(int i = 0;i < msd.GetLength(0);i++)
            for (int i = 0; i < msd.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = msd[i].MemberCode;
                dataGridView1.Rows[i].Cells[1].Value = msd[i].Name;
            }
        }
Beispiel #18
0
        private void FormCostListSimple_Load(object sender, EventArgs e)
        {
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // 列幅設定、入力不可設定
            for (int i = 0; i < dataGridView1.ColumnCount; i++)
            {
                dataGridView1.Columns[i].ReadOnly = true;
            }
            //if (cmd.GetLength(0) > 1) dataGridView1.Rows.Add(cmd.GetLength(0) - 1);
            if (cmd.Length > 1)
            {
                dataGridView1.Rows.Add(cmd.Length - 1);
            }
            //for (int i = 0; i < cmd.GetLength(0); i++)
            for (int i = 0; i < cmd.Length; i++)
            {
                dataGridView1.Rows[i].Cells[0].Value = cmd[i].CostCode;
                dataGridView1.Rows[i].Cells[1].Value = cmd[i].Item.Replace("(支払い)", "");
            }
        }
Beispiel #19
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

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

            uih.DgvReadyNoRHeader();
            uih.NoSortable();
            dataGridView1.Rows.Add(iniRCnt);

            create_cbOffice();                      // 事業所comboBox
            comboBoxOffice.Text = ted.OfficeName;
            create_cbWork();                        // 部門ComboBox
            comboBoxWork.Text = ted.DepartName;

            create_dtPicker();

            edit_Labels();

            initialViewSetting(0);

            nowMonth();

            // 指定月の実績値を外注作業実績データ(D_OsWkReport)から実績値を得る
        }
Beispiel #20
0
        private void FormPlanningCont_Load(object sender, EventArgs e)
        {
            this.defaultCellStyle = new DataGridViewCellStyle();

            UiHandling uih = new UiHandling(dataGridView1);

            //並び替えができないようにする
            foreach (DataGridViewColumn c in dataGridView1.Columns)
            {
                c.SortMode = DataGridViewColumnSortMode.NotSortable;
            }
            // Assist Message クリア
            labelMsg.Text = "";

            dataGridView1.Rows.Add(iniRCnt);
            buttonNumbering();

            initialDisplayPlannignContData();

            create_cbEVersion();

            // 作業項目マスタの取込み
            EstPlanOp ep = new EstPlanOp();

            wid = ep.StoreWorkItemsData(ted.MemberCode);

            // I/Fデータ(plnd)の既存データ数確認と利用可能ボタンの設定
            setButtonEnabled();

            // 既存内訳データ読込
            if (endPoint > -1 && plnd[idx].PlanningID > 0)
            {
                loadPlanningContData(dataGridView1);
            }

            updateStat = false;
        }
Beispiel #21
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 #22
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormTaskList_Load(object sender, EventArgs e)
        {
            create_cbOffice();
            comboBoxOffice.Text = hp.OfficeName;        // 初期値
            create_cbDepart();

            dataGridView1.Rows.Add(iniRCnt);
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // 20190318 asakawa edit
            // if( hp.OfficeCode == "H" && hp.Department == "0" ) hp.Department = "2";
            // displayTaskData( dataGridView1, hp.OfficeCode, hp.Department );
            if (hp.OfficeCode == "H" && hp.Department == "0")
            {
                displayTaskData(dataGridView1, hp.OfficeCode, "1");
            }
            else
            {
                displayTaskData(dataGridView1, hp.OfficeCode, hp.Department);
            }
            // 20190318 end
        }
Beispiel #23
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormOsPayment_Load(object sender, EventArgs e)
        {
            create_cbOffice();
            comboBoxOffice.Text = hp.OfficeCode;                                                                 // 初期値
            create_cbDepart();
            comboBoxDepart.Text = hp.Department;                                                                 // 初期値
            this.clsArray       = new DateTime[] { hp.CloseHDate, hp.CloseKDate, hp.CloseSDate, hp.CloseTDate }; // 現在の締日リスト

            dataGridView1.Rows.Add(iniRCnt);
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            readyDateTimePicker();
            dateTimePickerEx1.Value = clsArray[Conv.oList.IndexOf(hp.OfficeCode)].AddMonths(1);         // 初期表示開始月(締月の翌月)
            preReportDate           = dateTimePickerEx1.Value.EndOfMonth();

            labelACheckDate.Text = "";
            labelDCheckDate.Text = "";
            labelPCheckDate.Text = "";
            labelMsg.Text        = "";

            readyCheckBox();
            buttonEnabled();
            buttonCost.Enabled = false;

            // 取引先マスタより外注先一覧作成
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepart);
            ListFormDataOp lo = new ListFormDataOp();

            psd = lo.SelectPartnersScData();
            tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode);
            cmd = lo.SelectCostDataInitialF(Conv.OfficeCode);

            selectPaymentData(dataGridView1, dateTimePickerEx1.Value.EndOfMonth(), Conv.OfficeCode, Conv.DepartCode);
        }
Beispiel #24
0
        private void FormSubComList_Load(object sender, EventArgs e)
        {
            // DataGridView 設定
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            // データをdataGridViewにセット
            //dataGridView1.Rows.Add(psd.GetLength(0)-1);
            dataGridView1.Rows.Add(psd.Length - 1);
            //for (int i = 0; i < psd.GetLength(0); i++)
            for (int i = 0; i < psd.Length; i++)
            {
                //dataGridView1.Rows[i].Cells[0].Value = psd[i].PartnerCode;
                dataGridView1.Rows[i].Cells[0].Value = psd[i].AccountCode;
                dataGridView1.Rows[i].Cells[1].Value = psd[i].PartnerName;
                dataGridView1.Rows[i].Cells[2].Value = psd[i].PostCode;
                dataGridView1.Rows[i].Cells[3].Value = psd[i].Address;
                dataGridView1.Rows[i].Cells[4].Value = psd[i].TelNo;
                dataGridView1.Rows[i].Cells[5].Value = psd[i].FaxNo;
                dataGridView1.Rows[i].Cells[6].Value = psd[i].PartnerCode;
                dataGridView1.Rows[i].Cells[7].Value = Convert.ToString(psd[i].PartnerID);
            }
        }
Beispiel #25
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 + "発行の実行予算書で承認が未完了のものを表示しました。";
        }
Beispiel #26
0
        //---------------------------------------------------------------------
        //      Property
        //---------------------------------------------------------------------
        //---------------------------------------------------------------------
        //      Method
        //---------------------------------------------------------------------
        /// <summary>
        /// フォームロード時
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormImpAuthority_Load(object sender, EventArgs e)
        {
            // M_Membersから現職のメンバーを取得する
            MembersScData msd = new MembersScData();
            DataTable     dt  = msd.SelectMembersData();

            if (dt == null)
            {
                return;
            }
            fintMember = dt.Rows.Count;

            MembersScData[] msda = new MembersScData[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                msda[i] = new MembersScData(dt.Rows[i]);
                // データグリッドビューに社員名列を追加
                this.dgvSetting.Columns.Add("Member" + msda[i].MemberCode, msda[i].Name + $"\n({msda[i].MemberCode})");
                this.dgvSetting.Columns[i + 3].ReadOnly = true;
                this.dgvSetting.Columns[i + 3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            }

            // M_Authorizationからプログラムを取得
            AuthorizationData ad = new AuthorizationData();

            dt = ad.SelectAuthMaster();
            if (dt == null)
            {
                // 行の追加
                this.dgvSetting.Rows.Add(1);
            }
            else
            {
                // 行の追加
                this.dgvSetting.Rows.Add(dt.Rows.Count);
            }

            UiHandling uih = new UiHandling(this.dgvSetting);

            // ヘッダ背景色設定
            uih.DgvReadyNoRHeader();

            // M_Authorizationのレコードを表示
            string[] strMemberCode;             // 社員番号格納用
            if (dt != null)
            {
                Array.Resize(ref fintCheckNum, Convert.ToInt32(dt.Rows[dt.Rows.Count - 1]["AuthID"]) + 1);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    // ID
                    this.dgvSetting.Rows[i].Cells[0].Value = Convert.ToString(dt.Rows[i]["AuthID"]);
                    // 使用済みID設定
                    fintCheckNum[Convert.ToInt32(dt.Rows[i]["AuthID"])] = 1;
                    // ラベル
                    this.dgvSetting.Rows[i].Cells[1].Value = Convert.ToString(dt.Rows[i]["ModuleLabel"]);
                    // プログラム
                    this.dgvSetting.Rows[i].Cells[2].Value = Convert.ToString(dt.Rows[i]["ModuleName"]);
                    // 各社員番号設定
                    strMemberCode = Convert.ToString(dt.Rows[i]["AuthMember"]).Split(',');

                    for (int j = 0; j < strMemberCode.Length; j++)
                    {
                        // 登録済み社員番号分繰り返す
                        for (int k = 3; k < fintMember + 3; k++)
                        {
                            // 全社員番号分繰り返す
                            if (this.dgvSetting.Columns[k].Name == "Member" + strMemberCode[j])
                            {
                                this.dgvSetting.Rows[i].Cells[k].Value = "YES";
                            }
                            else if (Convert.ToString(this.dgvSetting.Rows[i].Cells[k].Value) != "YES")
                            {
                                this.dgvSetting.Rows[i].Cells[k].Value = "NO";
                            }
                        }
                    }
                }
            }
            else
            {
                for (int i = 3; i < fintMember + 3; i++)
                {
                    // 社員番号の全設定をNOとする
                    this.dgvSetting.Rows[0].Cells[i].Value = "NO";
                }
            }
        }
Beispiel #27
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 #28
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//


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

            ui.DgvReadyNoRHeader();

            dataGridView1.SelectionMode         = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            dataGridView1.AllowUserToDeleteRows = false;

            // 列幅設定、入力不可設定
            for (int i = 0; i < dataGridView1.ColumnCount; i++)
            {
                dataGridView1.Columns[i].ReadOnly = true;
            }
            if (crd.GetLength(0) > 1)
            {
                dataGridView1.Rows.Add(crd.GetLength(0) - 1);
            }

            //年月日
            DateTime dtReportDateBefore  = DateTime.MinValue;
            string   strReportDateBefore = dtReportDateBefore.ToString("yyyy/MM/dd");

            //伝票番号
            string strSlipNoBefore = "";

            //累計(小計)
            decimal decCumulative = 0;
            //累計(合計)
            decimal decTotalCumulative = 0;
            int     intGridCnt         = 0;

            for (int i = 0; i < crd.GetLength(0); i++)
            {
                if (intGridCnt != 0)
                {
                    if (strSlipNoBefore != crd[i].SlipNo.ToString())
                    {
                        dataGridView1.Rows.Add();
                        dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value = "";                                                //年月日
                        dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value     = "";                                                //伝票No
                        dataGridView1.Rows[intGridCnt].Cells["CostCode"].Value   = "";                                                //原価コード
                        dataGridView1.Rows[intGridCnt].Cells["Item"].Value       = "";                                                //品名
                        dataGridView1.Rows[intGridCnt].Cells["Unit"].Value       = "";                                                //単位
                        dataGridView1.Rows[intGridCnt].Cells["UnitPrice"].Value  = "";                                                //単価
                        dataGridView1.Rows[intGridCnt].Cells["Quantity"].Value   = "伝票計";                                             //数量
                        dataGridView1.Rows[intGridCnt].Cells["Cost"].Value       = DHandling.DecimaltoStr(decCumulative, "#,0");      //金額(小計)
                        decTotalCumulative = decTotalCumulative + decCumulative;
                        dataGridView1.Rows[intGridCnt].Cells["Cumulative"].Value = DHandling.DecimaltoStr(decTotalCumulative, "#,0"); //累計
                        decCumulative = 0;
                        intGridCnt++;
                    }
                }

                if (i == crd.GetLength(0) - 1)//最後の場合、伝票計、合計の行を追加しておく
                {
                    dataGridView1.Rows.Add();
                    dataGridView1.Rows.Add();
                }
                dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value = "";
                if (crd[i].ReportDate != null)
                {
                    if (strReportDateBefore != crd[i].ReportDate.ToString("yyyy/MM/dd"))
                    {
                        dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value = crd[i].ReportDate.ToString("yyyy/MM/dd");             //年月日
                        strReportDateBefore = dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value.ToString();
                    }
                }

                dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value = "";
                if (crd[i].SlipNo.ToString() != null && crd[i].SlipNo.ToString() != "")
                {
                    if (strSlipNoBefore != crd[i].SlipNo.ToString())
                    {
                        dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value = crd[i].SlipNo.ToString();
                        strSlipNoBefore = dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value.ToString();
                    }
                }

                dataGridView1.Rows[intGridCnt].Cells["CostCode"].Value  = crd[i].ItemCode;                                                                 //原価コード
                dataGridView1.Rows[intGridCnt].Cells["Item"].Value      = crd[i].Item;                                                                     //品名
                dataGridView1.Rows[intGridCnt].Cells["Unit"].Value      = crd[i].Unit;                                                                     //単位
                dataGridView1.Rows[intGridCnt].Cells["UnitPrice"].Value = (crd[i].UnitPrice == 0) ? "" : DHandling.DecimaltoStr(crd[i].UnitPrice, "#,0");  //単価
                dataGridView1.Rows[intGridCnt].Cells["Quantity"].Value  = (crd[i].Quantity == 0) ? "" : DHandling.DecimaltoStr(crd[i].Quantity, "#,0.00"); //数量
                dataGridView1.Rows[intGridCnt].Cells["Cost"].Value      = (crd[i].Cost == 0) ? "0" : DHandling.DecimaltoStr(crd[i].Cost, "#,0");           //金額
                decCumulative = decCumulative + crd[i].Cost;
                dataGridView1.Rows[intGridCnt].Cells["Cumulative"].Value = "N";
                intGridCnt++;
            }

            if (crd.GetLength(0) > 0)
            {
                dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value = "";                                                //年月日
                dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value     = "";                                                //伝票No
                dataGridView1.Rows[intGridCnt].Cells["CostCode"].Value   = "";                                                //原価コード
                dataGridView1.Rows[intGridCnt].Cells["Item"].Value       = "";                                                //品名
                dataGridView1.Rows[intGridCnt].Cells["Unit"].Value       = "";                                                //単位
                dataGridView1.Rows[intGridCnt].Cells["UnitPrice"].Value  = "";                                                //単価
                dataGridView1.Rows[intGridCnt].Cells["Quantity"].Value   = "伝票計";                                             //数量
                dataGridView1.Rows[intGridCnt].Cells["Cost"].Value       = DHandling.DecimaltoStr(decCumulative, "#,0");      //金額(小計)
                decTotalCumulative = decTotalCumulative + decCumulative;
                dataGridView1.Rows[intGridCnt].Cells["Cumulative"].Value = DHandling.DecimaltoStr(decTotalCumulative, "#,0"); //累計
                decCumulative = 0;
                intGridCnt++;
                dataGridView1.Rows[intGridCnt].Cells["ReportDate"].Value = "";                                                //年月日
                dataGridView1.Rows[intGridCnt].Cells["SlipNo"].Value     = "";                                                //伝票No
                dataGridView1.Rows[intGridCnt].Cells["CostCode"].Value   = "";                                                //原価コード
                dataGridView1.Rows[intGridCnt].Cells["Item"].Value       = "【合計】";                                            //品名
                dataGridView1.Rows[intGridCnt].Cells["Unit"].Value       = "";                                                //単位
                dataGridView1.Rows[intGridCnt].Cells["UnitPrice"].Value  = "";                                                //単価
                dataGridView1.Rows[intGridCnt].Cells["Quantity"].Value   = "";                                                //数量
                dataGridView1.Rows[intGridCnt].Cells["Cost"].Value       = DHandling.DecimaltoStr(decTotalCumulative, "#,0"); //金額(小計)
                dataGridView1.Rows[intGridCnt].Cells["Cumulative"].Value = DHandling.DecimaltoStr(decTotalCumulative, "#,0"); //累計
            }
        }
Beispiel #29
0
        //-----------------------------------------------//
        //      Property
        //-----------------------------------------------//

        //-----------------------------------------------//
        //      Method
        //-----------------------------------------------//
        private void FormCostSummary_Load(object sender, EventArgs e)
        {
            // DataGridViewの列タイトル設定
            UiHandling ui = new UiHandling(dataGridView1);

            // Wakamatsu 20170316
            string[] nTextArray = cif.EditColumnHeaderArraySummary(cif.Class0, cif.Class1, cif.Class2);
            //ui.DgvColumnName(0, cif.EditColumnNameArraySummary(cif.Class0, cif.Class1, cif.Class2));
            //ui.DgvColumnHeader(0, cif.EditColumnHeaderArraySummary(cif.Class0, cif.Class1, cif.Class2));
            ui.DgvColumnHeader(0, nTextArray);

            int VisibleCount = 0;

            for (int i = 0; i < nTextArray.Length; i++)
            {
                if (nTextArray[i] == "")
                {
                    this.dataGridView1.Columns[i].Visible = false;
                }
                else
                {
                    VisibleCount++;
                }
            }

            switch (VisibleCount)
            {
            case 0:
                this.dataGridView1.Columns[0].Visible = true;
                this.dataGridView1.Columns[0].Width   = 980;
                TotalColumns = 0;
                break;

            case 1:
                for (int i = 0; i < nTextArray.Length; i++)
                {
                    if (this.dataGridView1.Columns[i].Visible == true)
                    {
                        this.dataGridView1.Columns[i].Width = 980;
                        TotalColumns = i;
                    }
                }
                break;

            case 2:
                for (int i = 0; i < nTextArray.Length; i++)
                {
                    if (this.dataGridView1.Columns[i].Visible == true)
                    {
                        this.dataGridView1.Columns[i].Width = 490;
                        TotalColumns = i;
                    }
                }
                break;

            case 3:
                this.dataGridView1.Columns[0].Width = 340;
                this.dataGridView1.Columns[1].Width = 320;
                this.dataGridView1.Columns[2].Width = 320;
                TotalColumns = 2;
                break;

            default:
                break;
            }
            // Wakamatsu 20170316

            //原価計上日
            labelFrom.Text = cif.DateSOP.ToString("yyyy/MM/dd");
            labelTo.Text   = cif.DateEOP.ToString("yyyy/MM/dd");

            //明細表
            labelType.Text = cif.ClassificationItem;

            //出力範囲
            labelRange.Text = cif.OutputRange;

            labelOffice.Text = cif.Office;

            // データ読み込み
            displayDetailInformation(dataGridView1, cif.SqlStr);
        }