/// <summary>delete import history
        ///
        /// </summary>
        private void DeleteBy_DeleteCheck()
        {
            if (DSP_MSG("Q102", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty).Equals("1"))
            {
                tmie      = new T_MakerInport_Entity();
                InportSEQ = string.Empty;
                foreach (DataGridViewRow row in dgvImportRireki.Rows)
                {
                    if (Convert.ToBoolean(row.Cells["chk3"].Value) == true)
                    {
                        if (InportSEQ != string.Empty)
                        {
                            InportSEQ += ",";
                        }

                        InportSEQ += row.Cells["colInportSEQ"].Value.ToString();
                    }
                }
                tmie.InportSEQ      = InportSEQ;
                tmie.InsertOperator = loginInfo.OperatorCode;
                tmie.InsertDateTime = System.DateTime.Now.ToString();
                psks0103ibl.PSKS0103I_DELETE(tmie);
                InportRireki_Select();
            }
        }
Beispiel #2
0
        public bool PSKS0103I_DELETE(T_MakerInport_Entity tmie)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("@InportSEQ", tmie.InportSEQ);
            dic.Add("@InsertOperator", tmie.InsertOperator);
            dic.Add("@InsertDateTime", tmie.InsertDateTime);

            return(InsertUpdateDeleteData(dic, "PSKS0103I_DELETE"));
        }
Beispiel #3
0
        public bool ImportProcess(T_MakerInport_Entity tmie, string insertDateTime)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("@DataSourseMakerCD", tmie.DataSourseMakerCD);
            dic.Add("@InportFile", tmie.InportFile);

            dic.Add("@PatternCD", tmie.PatternCD);
            dic.Add("@InsertOperator", tmie.InsertOperator);
            dic.Add("@InsertDateTime", insertDateTime);
            dic.Add("@XML", tmie.xml);
            return(InsertUpdateDeleteData(dic, "PSKS01013I_ImportProcess"));
        }
Beispiel #4
0
 public bool PSKS0103I_DELETE(T_MakerInport_Entity tmie)
 {
     return(psks0103idl.PSKS0103I_DELETE(tmie));
 }
Beispiel #5
0
        private bool InportProcesses(T_MakerZaiko_Entity tmze, string patternCD, DataTable dtPattern, string insertDateTime)//取込処理
        {
            try
            {
                string noukiFlag = "0";

                DataRow[] drs      = dtPattern.Select("Convert(ItemProperty, 'System.Int32') = 1");
                int       colIndex = Convert.ToInt32(drs[0]["SEQ"].ToString()) - 1;

                tmze.dt1.Columns[colIndex].ColumnName = "JANCD";

                drs = dtPattern.Select("Convert(ItemProperty, 'System.Int32') = 2");
                int i = 0;
                foreach (DataRow dr in drs)
                {
                    colIndex = Convert.ToInt32(drs[i]["SEQ"].ToString()) - 1;
                    tmze.dt1.Columns[colIndex].ColumnName = "P" + ++i;
                }
                while (i < 5)
                {
                    DataColumn dc = new DataColumn();
                    dc.DefaultValue = 0;
                    dc.ColumnName   = "P" + ++i;
                    tmze.dt1.Columns.Add(dc);
                }

                i   = 0;
                drs = dtPattern.Select("Convert(ItemProperty, 'System.Int32') = 3");
                foreach (DataRow dr in drs)
                {
                    colIndex = Convert.ToInt32(drs[i]["SEQ"].ToString()) - 1;
                    tmze.dt1.Columns[colIndex].ColumnName = "M" + ++i;
                }

                while (i < 5)
                {
                    DataColumn dc = new DataColumn();
                    dc.DefaultValue = 0;
                    dc.ColumnName   = "M" + ++i;
                    tmze.dt1.Columns.Add(dc);
                }

                tmze.dt1.Columns.Add("ZaikoSuTotal");

                drs = dtPattern.Select("Convert(ItemProperty, 'System.Int32') = 9 or Convert(ItemProperty, 'System.Int32') = 10");
                if (drs.Count() > 0)
                {
                    colIndex = Convert.ToInt32(drs[0]["SEQ"].ToString()) - 1;
                    tmze.dt1.Columns[colIndex].ColumnName = "Nouki";

                    if (drs[0]["Convert(ItemProperty, 'System.Int32')"].ToString().Equals("9"))
                    {
                        noukiFlag = "1";
                    }
                }
                else
                {
                    tmze.dt1.Columns.Add("Nouki");
                }

                ArrayList arrcol = new ArrayList();

                foreach (DataColumn dc in tmze.dt1.Columns)
                {
                    if (!(dc.ColumnName.Equals("JANCD") || dc.ColumnName.Equals("P1") || dc.ColumnName.Equals("P2") || dc.ColumnName.Equals("P3") || dc.ColumnName.Equals("P4") || dc.ColumnName.Equals("P5") ||
                          dc.ColumnName.Equals("M1") || dc.ColumnName.Equals("M2") || dc.ColumnName.Equals("M3") || dc.ColumnName.Equals("M4") || dc.ColumnName.Equals("M5") || dc.ColumnName.Equals("ZaikoSuTotal") ||
                          dc.ColumnName.Equals("Nouki")))
                    {
                        arrcol.Add(dc);
                    }
                }

                foreach (DataColumn dc in arrcol)
                {
                    tmze.dt1.Columns.Remove(dc);
                }

                tmze.dt1.AcceptChanges();

                tmze.dt1.Columns.Add("HenkanNouki");
                tmze.dt1.Columns.Add("ErrorKBN");
                tmze.dt1.Columns.Add("ErrorText");

                DataColumn dc1 = new DataColumn();
                dc1.DefaultValue = 0;
                dc1.ColumnName   = "SEQ";
                tmze.dt1.Columns.Add(dc1);

                tmie = new T_MakerInport_Entity();
                tmie.DataSourseMakerCD = tmze.MakerCD;
                tmie.InportFile        = tmze.ImportFileName;
                tmie.InsertOperator    = tmze.InsertOperator;
                tmie.PatternCD         = patternCD;
                tmie.xml = DataTableToXml(tmze.dt1);

                return(psks0103idl.Import(tmie, insertDateTime, noukiFlag));
            }
            catch (Exception)
            {
                return(false);
            }
        }