Exemple #1
0
        private ShouhinEntity Get_UIData()
        {
            ShouhinEntity sh_e = new ShouhinEntity();

            if (rdo_ChokkinDate.Checked)
            {
                sh_e.Output_Type = 0;
            }
            else
            {
                sh_e.Output_Type = 1;
            }
            sh_e.ShouhinCD1       = txtShouhinCD_From.Text;
            sh_e.ShouhinCD2       = txtShouhinCD_To.Text;
            sh_e.JANCD            = txtJANCD_From.Text;
            sh_e.JANCD1           = txtJANCD_To.Text;
            sh_e.ShouhinRyakuName = txtShouhinName.Text;
            sh_e.BrandCD          = txtBrand_From.Text;
            sh_e.BrandCD1         = txtBrand_To.Text;
            sh_e.ColorNo1         = txtColorNO1.Text;
            sh_e.ColorNo2         = txtColorNO2.Text;
            sh_e.SizeNo1          = txtSizeNO1.Text;
            sh_e.SizeNo2          = txtSizeNO2.Text;
            sh_e.Remarks          = txtRemarks.Text;
            sh_e.PC             = PCID;
            sh_e.ProgramID      = ProgramID;
            sh_e.InsertOperator = OperatorCD;
            return(sh_e);
        }
        private void BindDataGrid()
        {
            ShouhinEntity shouhin = new ShouhinEntity();

            if (rdoRecentRevisionDate.Checked)
            {
                shouhin.DisplayTarget = 0;
            }
            else
            {
                shouhin.DisplayTarget = 1;
            }
            shouhin.RevisionDate = txtChangeDate.Text;
            shouhin.HinbanCD     = txtHinbanCD.Text;
            shouhin.HinbanCD1    = txtHinbanCD1.Text;
            shouhin.JANCD        = txtJANCD.Text;
            shouhin.JANCD1       = txtJANCD1.Text;
            shouhin.Remarks      = txtRemarks.Text;
            shouhin.ProductName  = txtProductName.Text;
            shouhin.Exhibition   = txtExhibition.Text;
            shouhin.Exhibition1  = txtExhibition1.Text;
            shouhin.SS           = chkSS.Checked ? "1" : "0";
            shouhin.FW           = chkFW.Checked ? "1" : "0";
            shouhin.Color        = txtColor.Text;
            shouhin.KatakanaName = txtKanaName.Text;
            shouhin.BrandCD      = txtBrand.Text;
            shouhin.BrandCD1     = txtBrand1.Text;
            shouhin.Size         = txtSize.Text;
            DataTable dt = shouhinbl.Shouhin_SearchData(shouhin);

            dgDetail.DataSource = dt;

            if (dt.Rows.Count == 0)  //HET
            {
                ClearSession();
            }

            this.dgDetail.CellPainting       += new DataGridViewCellPaintingEventHandler(dgDetail_CellPainting);
            this.dgDetail.Paint              += new PaintEventHandler(dgDetail_Paint);
            this.dgDetail.Scroll             += new ScrollEventHandler(dgDetail_Scroll);
            this.dgDetail.ColumnWidthChanged += new DataGridViewColumnEventHandler(dgDetail_ColumnWidthChanged);

            this.dgDetail.Columns[0].Visible = false;
            this.dgDetail.Columns[4].DefaultCellStyle.Alignment  = DataGridViewContentAlignment.MiddleCenter;
            this.dgDetail.Columns[4].HeaderCell.Style.Alignment  = DataGridViewContentAlignment.MiddleCenter;
            this.dgDetail.Columns[13].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgDetail.Columns[13].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;

            this.dgDetail.Columns[5].HeaderText  = "";
            this.dgDetail.Columns[6].HeaderText  = "";
            this.dgDetail.Columns[7].HeaderText  = "";
            this.dgDetail.Columns[8].HeaderText  = "";
            this.dgDetail.Columns[9].HeaderText  = "";
            this.dgDetail.Columns[10].HeaderText = "";
            this.dgDetail.Columns[11].HeaderText = "";
            this.dgDetail.Columns[12].HeaderText = "";
        }
Exemple #3
0
        private ShouhinEntity getShouhin()
        {
            ShouhinEntity shouhin_entity = new ShouhinEntity();

            shouhin_entity.Product          = txtProduct.Text.Trim() + txtColor.Text.Trim() + txtSize.Text.Trim();
            shouhin_entity.Color            = txtColor.Text.Trim();
            shouhin_entity.Size             = txtSize.Text.Trim();
            shouhin_entity.RevisionDate     = txtChangeDate.Text.Trim();
            shouhin_entity.CopyProduct      = txtCopyProduct.Text.Trim();
            shouhin_entity.CopyColorNO      = txtCopyColor.Text.Trim();
            shouhin_entity.CopySizeNO       = txtCopySize.Text.Trim();
            shouhin_entity.CopyRevisionDate = txtCopyChangeDate.Text.Trim();
            shouhin_entity.ShokutiFLG       = chkShukou.Checked ? 1 : 0;
            shouhin_entity.HinbanCD         = txtProduct.Text.Trim();
            shouhin_entity.ProductName      = txtProductName.Text.Trim();
            shouhin_entity.ShouhinRyakuName = txtShouhinRyakuName.Text.Trim();
            shouhin_entity.KatakanaName     = txtKatakanaName.Text.Trim();
            shouhin_entity.JANCD            = txtJANCD.Text.Trim();
            shouhin_entity.Exhibition       = txtExhibition.Text.Trim();
            shouhin_entity.SS                     = chkSS.Checked ? "1" : "0";
            shouhin_entity.FW                     = chkFW.Checked ? "1" : "0";
            shouhin_entity.TaniCD                 = txtTani.Text.Trim();
            shouhin_entity.BrandCD                = txtBrand.Text.Trim();
            shouhin_entity.JoudaiTanka            = txtRetailPrice.Text.Trim();
            shouhin_entity.GedaiTanka             = txtLowerPrice.Text.Trim();
            shouhin_entity.HyoujunGenkaTanka      = txtStandardPrice.Text.Trim();
            shouhin_entity.ZeirituKBN             = Convert.ToInt32(txtTaxRate.Text.Trim());
            shouhin_entity.ZaikoHyoukaKBN         = Convert.ToInt32(txtIEvaluation.Text.Trim());
            shouhin_entity.ZaikoKanriKBN          = Convert.ToInt32(txtIManagement.Text.Trim());
            shouhin_entity.MainSiiresakiCD        = txtMajorSuppliers.Text.Trim();
            shouhin_entity.ToriatukaiShuuryouDate = txtHandlingEndDate.Text.Trim();
            shouhin_entity.HanbaiTeisiDate        = txtSalesStopDate.Text.Trim();
            shouhin_entity.Model_No               = txtModelNo.Text.Trim();
            shouhin_entity.Model_Name             = txtModelName.Text.Trim();
            shouhin_entity.FOB                    = txtFOB.Text.Trim();
            shouhin_entity.Shipping_Place         = txtShippingPlace.Text.Trim();
            shouhin_entity.HacchuuLot             = Convert.ToDecimal(txtHacchuuLot.Text.Trim());
            shouhin_entity.ImageFilePathName      = txtImage.Text.Trim();
            shouhin_entity.Image                  = !string.IsNullOrEmpty(txtImage.Text.Trim()) ? System.IO.File.ReadAllBytes(txtImage.Text) : new byte[] { };
            shouhin_entity.Remarks                = txtRemarks.Text;
            shouhin_entity.KensakuHyouziJun       = !string.IsNullOrWhiteSpace(txtKensakuHyouziJun.Text.Trim()) ? Convert.ToInt32(txtKensakuHyouziJun.Text.Trim()) : 0;
            shouhin_entity.InsertOperator         = base_entity.OperatorCD;
            shouhin_entity.UpdateOperator         = base_entity.OperatorCD;

            //for log table
            shouhin_entity.PC        = base_entity.PC;
            shouhin_entity.ProgramID = base_entity.ProgramID;
            shouhin_entity.KeyItem   = txtProduct.Text + " " + txtChangeDate.Text;
            return(shouhin_entity);
        }
Exemple #4
0
        private void DBProcess()
        {
            ShouhinEntity shouhin_entity = getShouhin();

            switch (cboMode.SelectedValue)
            {
            case "1":
                shouhin_entity.Mode = "New";
                break;

            case "2":
                shouhin_entity.Mode = "Update";
                break;

            case "3":
                shouhin_entity.Mode = "Delete";
                break;
            }
            Shouhin_IUD(shouhin_entity);
        }
Exemple #5
0
        private string GetFileData()
        {
            string        error    = "false";
            var           filePath = string.Empty;
            ShouhinEntity obj      = new ShouhinEntity();
            string        Xml      = string.Empty;

            using (OpenFileDialog openFileDialog = new OpenFileDialog())
            {
                openFileDialog.InitialDirectory = "C:\\CSV Folder\\";
                openFileDialog.Title            = "Browse CSV Files";
                openFileDialog.Filter           = "csv files (*.csv)|*.csv";
                openFileDialog.FilterIndex      = 2;
                openFileDialog.RestoreDirectory = true;
                DataTable create_dt = new DataTable();
                Add_Datatable_Column(create_dt);
                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    filePath = openFileDialog.FileName;
                    string[] csvRows = File.ReadAllLines(filePath, Encoding.GetEncoding(932));
                    var      bl_list = new List <bool>();
                    for (int i = 1; i < csvRows.Length; i++)
                    {
                        error = "false";
                        var     data = csvRows[i].Split(',');
                        DataRow dr   = create_dt.NewRow();
                        for (int j = 0; j < data.Length; j++)
                        {
                            if (string.IsNullOrWhiteSpace(data[j]))
                            {
                                dr[j] = DBNull.Value;
                            }
                            else
                            {
                                dr[j] = data[j].ToString();
                            }
                        }
                        dr["UsedFlg"]        = "0";
                        dr["InsertOperator"] = base_entity.OperatorCD;
                        dr["UpdateOperator"] = base_entity.OperatorCD;

                        //string[] NullCheck_List = { "0", "1", "2", "3", "4", "5", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"};
                        //string[] NullCheck_Msg = { "商品CD未入力エラー", "改定日未入力エラー", "諸口未入力エラー", "品番CD未入力エラー", "商品名未入力エラー", "略名未入力エラー", "単位CD未入力エラー", "ブランドCD未入力エラー", "カラーNO未入力エラー", "サイズNO未入力エラー", "上代単価未入力エラー", "下代単価未入力エラー", "標準原価単価未入力エラー", "税率区分未入力エラー", "在庫評価区分未入力エラー", "在庫管理区分未入力エラー", "主要仕入先未入力エラー" };
                        //string[] ByteCheck_List = { "0_50", "3_20", "4_100", "5_80", "6_80", "8_13", "9_6", "10_6", "11_6", "12_2", "13_10", "14_13", "15_13", "22_10", "31_80"};
                        //string[] ByteCheck_Msg = { "商品CD桁数エラー", "品番CD桁数エラー", "商品名桁数エラー", "略名桁数エラー", "カナ名桁数エラー", "JANCD桁数エラー", "年度桁数エラー", "シーズンSS桁数エラー", "シーズンFW桁数エラー", "単位CD桁数エラー", "ブランドCD桁数エラー", "カラーNO桁数エラー", "サイズNO桁数エラー", "主要仕入先CD桁数エラー", "備考桁数エラー" };
                        //string[] ValueCheck_List = { "2", "19", "20", "21" };
                        //string[] ValueCheck_Amt = { "1", "2", "3", "1" };
                        //string[] ValueCheck_Msg = { "項目:諸口区分(0~1)", "項目:税率区分(0~2)", "項目:在庫評価区分(0~3)", "項目:在庫管理区分(0~1)" };
                        //string[] DateCheck_List = { "1", "23", "24" };
                        //string[] DateCheck_Msg = { "項目:改定日", "項目:取扱終了日", "項目:販売停止日" };
                        //string[] NonNumeric_List = { "16", "17", "18", "27" };
                        //string[] NonNumeric_Msg = { "項目:上代単価", "項目:下代単価", "項目:標準原価単価", "項目:FOB" };
                        //string InputValue_Msg = "入力可能値外エラー";
                        //string[] MasterCheck_List = { "12", "13", "14", "15", "22" };
                        //string[] MasterCheck_ID = { "102", "103", "104", "105" };
                        //string[] MasterCheck_Msg = { "単位CD未登録エラー", "ブランドCD未登録エラー", "カラーNO未登録エラー", "サイズNO未登録エラー", "主要仕入先CD未登録エラー" };

                        //for (int nc = 0; nc < NullCheck_List.Length; nc++)
                        //{
                        //    int ncl_index = Convert.ToInt32(NullCheck_List[nc].ToString());
                        //    if (Null_Check(data[ncl_index].ToString(), i, NullCheck_Msg[nc].ToString()))
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //}

                        //for (int bc = 0; bc < ByteCheck_List.Length; bc++)
                        //{
                        //    var bcl = ByteCheck_List[bc].ToString().Split('_');
                        //    int bcl_index = Convert.ToInt32(bcl[0]);
                        //    int bcl_len = Convert.ToInt32(bcl[1]);
                        //    if (Byte_Check(bcl_len, data[bcl_index].ToString(), i, ByteCheck_Msg[bc].ToString()))
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //}

                        //for (int vc = 0; vc < ValueCheck_List.Length; vc++)
                        //{
                        //    int vcl_index = Convert.ToInt32(ValueCheck_List[vc].ToString());
                        //    int vc_Amount = Convert.ToInt32(ValueCheck_Amt[vc].ToString());
                        //    string vc_msg = ValueCheck_Msg[vc].ToString();
                        //    if (Value_Check(data[vcl_index].ToString(), i, vc_Amount, InputValue_Msg, vc_msg))
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //}

                        //for(int dc = 0; dc < DateCheck_List.Length; dc++)
                        //{
                        //    int dcl_index = Convert.ToInt32(DateCheck_List[dc].ToString());
                        //    string dc_msg = DateCheck_Msg[dc].ToString();
                        //    if (Date_Check(data[dcl_index].ToString(), i, InputValue_Msg, dc_msg) == "true")
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //    else
                        //    {
                        //        dr[dcl_index] = Date_Check(data[dcl_index].ToString(), i, InputValue_Msg, dc_msg);
                        //    }
                        //}

                        //for(int nn = 0; nn < NonNumeric_List.Length; nn++)
                        //{
                        //    int nnl_index = Convert.ToInt32(NonNumeric_List[nn].ToString());
                        //    string nn_msg = NonNumeric_Msg[nn].ToString();
                        //    if (NonNumeric_Check(data[nnl_index].ToString(), i, InputValue_Msg, nn_msg))
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //}

                        //for(int mc = 0; mc < MasterCheck_List.Length; mc++)
                        //{
                        //    string CD_ID = string.Empty, Key_Date = string.Empty;
                        //    int type;
                        //    int mcl_index = Convert.ToInt32(MasterCheck_List[mc].ToString());
                        //    if(mc != MasterCheck_List.Length - 1)
                        //    {
                        //        CD_ID = MasterCheck_ID[mc].ToString();
                        //        Key_Date = data[mcl_index].ToString();
                        //        type = 0;
                        //    }
                        //    else
                        //    {
                        //        CD_ID = data[0].ToString();
                        //        Key_Date = data[1].ToString();
                        //        type = 1;
                        //    }

                        //    if (Master_Check(CD_ID, Key_Date, type, i, MasterCheck_Msg[mc].ToString()))
                        //    {
                        //        error = "true";
                        //        goto StopProcess;
                        //    }
                        //}

                        byte[] img;
                        if (ImageFile_Check(data[30].ToString(), i, "指定したパスに画像ファイルが存在しないエラー"))
                        {
                            //bbl.ShowMessage("E276", i.ToString(), "指定したパスに画像ファイルが存在しないエラー");
                            return(string.Empty);
                        }
                        else
                        {
                            img    = !string.IsNullOrEmpty(data[30].ToString().Trim()) ? System.IO.File.ReadAllBytes(data[30].ToString()) : new byte[] { };
                            dr[31] = Convert.ToBase64String(img);
                        }

                        dr["Error"] = error;
                        create_dt.Rows.Add(dr);
                    }
                    if (create_dt.Rows.Count > 0)
                    {
                        for (int r = 0; r < create_dt.Rows.Count; r++)
                        {
                            //NMW Task No 592 begin
                            TextBox txt1 = new TextBox();
                            txt1.Text = create_dt.Rows[r]["ChangeDate"].ToString();//column_1
                            if (cf.DateCheck(txt1))
                            {
                                create_dt.Rows[r]["ChangeDate"] = string.IsNullOrEmpty(txt1.Text)? null:txt1.Text;
                            }
                            string date1 = create_dt.Rows[r]["ChangeDate"].ToString();//column_1

                            TextBox txt2 = new TextBox();
                            txt2.Text = create_dt.Rows[r]["ToriatukaiShuuryouDate"].ToString();//column_2
                            if (cf.DateCheck(txt2))
                            {
                                create_dt.Rows[r]["ToriatukaiShuuryouDate"] = string.IsNullOrEmpty(txt2.Text)?null:txt2.Text;
                            }
                            string date2 = create_dt.Rows[r]["ToriatukaiShuuryouDate"].ToString();//column_2

                            TextBox txt3 = new TextBox();
                            txt3.Text = create_dt.Rows[r]["HanbaiTeisiDate"].ToString();//column_3
                            if (cf.DateCheck(txt3))
                            {
                                create_dt.Rows[r]["HanbaiTeisiDate"] = string.IsNullOrEmpty(txt3.Text) ? null : txt3.Text;
                            }
                            string date3 = create_dt.Rows[r]["HanbaiTeisiDate"].ToString();//column_3
                            //NMW Task NO 592 end
                            int line_No = r + 1;

                            if (Date_Check(date1, line_No, "入力可能値外エラー", "項目:改定日") == "true")
                            {
                                return(null);
                            }
                            else if (Date_Check(date2, line_No, "入力可能値外エラー", "項目:取扱終了日") == "true")
                            {
                                return(null);
                            }
                            else if (Date_Check(date3, line_No, "入力可能値外エラー", "項目:販売停止日") == "true")
                            {
                                return(null);
                            }
                            else if (r == create_dt.Rows.Count - 1)
                            {
                                Xml = cf.DataTableToXml(create_dt);
                            }
                        }
                    }
                    ////if (error == "false")
                    //Xml = cf.DataTableToXml(create_dt);
                    ////else
                    ////    Xml = string.Empty;
                }
                else
                {
                    Xml = string.Empty;
                }
            }
            return(Xml);
        }
Exemple #6
0
 private bool Shouhin_IUD(ShouhinEntity shouhin_entity)
 {
     return(shouhinbl.Shouhin_IUD(shouhin_entity));
 }
Exemple #7
0
        public DataTable Get_ExportData(ShouhinEntity sh_e)//add ssa
        {
            CKMDL ckmdl = new CKMDL();

            sh_e.Sqlprms    = new SqlParameter[16];
            sh_e.Sqlprms[0] = new SqlParameter("@ShouhinCD1", SqlDbType.VarChar)
            {
                Value = sh_e.ShouhinCD1
            };
            sh_e.Sqlprms[1] = new SqlParameter("@ShouhinCD2", SqlDbType.VarChar)
            {
                Value = sh_e.ShouhinCD2
            };
            sh_e.Sqlprms[2] = new SqlParameter("@JANCD1", SqlDbType.VarChar)
            {
                Value = sh_e.JANCD
            };
            sh_e.Sqlprms[3] = new SqlParameter("@JANCD2", SqlDbType.VarChar)
            {
                Value = sh_e.JANCD1
            };
            sh_e.Sqlprms[4] = new SqlParameter("@ShouhinName", SqlDbType.VarChar)
            {
                Value = sh_e.ShouhinRyakuName
            };
            sh_e.Sqlprms[5] = new SqlParameter("@BrandCD1", SqlDbType.VarChar)
            {
                Value = sh_e.BrandCD
            };
            sh_e.Sqlprms[6] = new SqlParameter("@BrandCD2", SqlDbType.VarChar)
            {
                Value = sh_e.BrandCD1
            };
            sh_e.Sqlprms[7] = new SqlParameter("@ColorNO1", SqlDbType.VarChar)
            {
                Value = sh_e.ColorNo1
            };
            sh_e.Sqlprms[8] = new SqlParameter("@ColorNO2", SqlDbType.VarChar)
            {
                Value = sh_e.ColorNo2
            };
            sh_e.Sqlprms[9] = new SqlParameter("@SizeNO1", SqlDbType.VarChar)
            {
                Value = sh_e.SizeNo1
            };
            sh_e.Sqlprms[10] = new SqlParameter("@SizeNO2", SqlDbType.VarChar)
            {
                Value = sh_e.SizeNo2
            };
            sh_e.Sqlprms[11] = new SqlParameter("@Remarks", SqlDbType.VarChar)
            {
                Value = sh_e.Remarks
            };
            sh_e.Sqlprms[12] = new SqlParameter("@Output_Type", SqlDbType.TinyInt)
            {
                Value = sh_e.Output_Type
            };
            sh_e.Sqlprms[13] = new SqlParameter("@Program", SqlDbType.VarChar)
            {
                Value = sh_e.ProgramID
            };
            sh_e.Sqlprms[14] = new SqlParameter("@PC", SqlDbType.VarChar)
            {
                Value = sh_e.PC
            };
            sh_e.Sqlprms[15] = new SqlParameter("@InsertOperator", SqlDbType.VarChar)
            {
                Value = sh_e.InsertOperator
            };
            return(ckmdl.SelectDatatable("Get_Shouhin_ExportData", GetConnectionString(), sh_e.Sqlprms));
        }
Exemple #8
0
        public DataTable Shouhin_SearchData(ShouhinEntity shouhin)
        {
            CKMDL ckmdl = new CKMDL();

            shouhin.Sqlprms    = new SqlParameter[17];
            shouhin.Sqlprms[0] = new SqlParameter("@DisplayTarget", SqlDbType.Int)
            {
                Value = shouhin.DisplayTarget
            };
            shouhin.Sqlprms[1] = new SqlParameter("@ChangeDate", SqlDbType.VarChar)
            {
                Value = shouhin.RevisionDate
            };
            shouhin.Sqlprms[2] = new SqlParameter("@HinbanCD", SqlDbType.VarChar)
            {
                Value = shouhin.HinbanCD
            };
            shouhin.Sqlprms[3] = new SqlParameter("@HinbanCD1", SqlDbType.VarChar)
            {
                Value = shouhin.HinbanCD1
            };
            shouhin.Sqlprms[4] = new SqlParameter("@JANCD", SqlDbType.VarChar)
            {
                Value = shouhin.JANCD
            };
            shouhin.Sqlprms[5] = new SqlParameter("@JANCD1", SqlDbType.VarChar)
            {
                Value = shouhin.JANCD1
            };
            shouhin.Sqlprms[6] = new SqlParameter("@Remarks", SqlDbType.VarChar)
            {
                Value = shouhin.Remarks
            };
            shouhin.Sqlprms[7] = new SqlParameter("@ShouhinName", SqlDbType.VarChar)
            {
                Value = shouhin.ProductName
            };
            shouhin.Sqlprms[8] = new SqlParameter("@YearTerm", SqlDbType.VarChar)
            {
                Value = shouhin.Exhibition
            };
            shouhin.Sqlprms[9] = new SqlParameter("@YearTerm1", SqlDbType.VarChar)
            {
                Value = shouhin.Exhibition1
            };
            shouhin.Sqlprms[10] = new SqlParameter("@SS", SqlDbType.VarChar)
            {
                Value = shouhin.SS
            };
            shouhin.Sqlprms[11] = new SqlParameter("@FW", SqlDbType.VarChar)
            {
                Value = shouhin.FW
            };
            shouhin.Sqlprms[12] = new SqlParameter("@Color", SqlDbType.VarChar)
            {
                Value = shouhin.Color
            };
            shouhin.Sqlprms[13] = new SqlParameter("@KanaName", SqlDbType.VarChar)
            {
                Value = shouhin.KatakanaName
            };
            shouhin.Sqlprms[14] = new SqlParameter("@Brand", SqlDbType.VarChar)
            {
                Value = shouhin.BrandCD
            };
            shouhin.Sqlprms[15] = new SqlParameter("@Brand1", SqlDbType.VarChar)
            {
                Value = shouhin.BrandCD1
            };
            shouhin.Sqlprms[16] = new SqlParameter("@Size", SqlDbType.VarChar)
            {
                Value = shouhin.Size
            };
            return(ckmdl.SelectDatatable("sp_Shouhin_SearchData", GetConnectionString(), shouhin.Sqlprms));
        }
Exemple #9
0
        public bool Shouhin_IUD(ShouhinEntity shouhin_entity)
        {
            BaseBL bl    = new BaseBL();
            CKMDL  ckmdl = new CKMDL();

            ckmdl.UseTran             = true;
            shouhin_entity.Sqlprms    = new SqlParameter[39];
            shouhin_entity.Sqlprms[0] = new SqlParameter("@ShouhinCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Product
            };
            shouhin_entity.Sqlprms[1] = new SqlParameter("@ChangeDate", SqlDbType.VarChar)
            {
                Value = shouhin_entity.RevisionDate
            };
            shouhin_entity.Sqlprms[2] = new SqlParameter("@ShokutiFLG", SqlDbType.Int)
            {
                Value = shouhin_entity.ShokutiFLG
            };
            shouhin_entity.Sqlprms[3] = new SqlParameter("@HinbanCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.HinbanCD
            };
            shouhin_entity.Sqlprms[4] = new SqlParameter("@ShouhinName", SqlDbType.VarChar)
            {
                Value = shouhin_entity.ProductName
            };
            shouhin_entity.Sqlprms[5] = new SqlParameter("@ShouhinRyakuName", SqlDbType.VarChar)
            {
                Value = shouhin_entity.ShouhinRyakuName
            };
            shouhin_entity.Sqlprms[6] = new SqlParameter("@KanaName", SqlDbType.VarChar)
            {
                Value = shouhin_entity.KatakanaName
            };
            shouhin_entity.Sqlprms[7] = new SqlParameter("@KensakuHyouziJun", SqlDbType.Int)
            {
                Value = shouhin_entity.KensakuHyouziJun
            };
            shouhin_entity.Sqlprms[8] = new SqlParameter("@JANCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.JANCD
            };
            shouhin_entity.Sqlprms[9] = new SqlParameter("@YearTerm", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Exhibition
            };
            shouhin_entity.Sqlprms[10] = new SqlParameter("@SeasonSS", SqlDbType.VarChar)
            {
                Value = shouhin_entity.SS
            };
            shouhin_entity.Sqlprms[11] = new SqlParameter("@SeasonFW", SqlDbType.VarChar)
            {
                Value = shouhin_entity.FW
            };
            shouhin_entity.Sqlprms[12] = new SqlParameter("@TaniCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.TaniCD
            };
            shouhin_entity.Sqlprms[13] = new SqlParameter("@BrandCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.BrandCD
            };
            shouhin_entity.Sqlprms[14] = new SqlParameter("@ColorNO", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Color
            };
            shouhin_entity.Sqlprms[15] = new SqlParameter("@SizeNO", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Size
            };
            shouhin_entity.Sqlprms[16] = new SqlParameter("@JoudaiTanka", SqlDbType.VarChar)
            {
                Value = shouhin_entity.JoudaiTanka
            };
            shouhin_entity.Sqlprms[17] = new SqlParameter("@GedaiTanka", SqlDbType.VarChar)
            {
                Value = shouhin_entity.GedaiTanka
            };
            shouhin_entity.Sqlprms[18] = new SqlParameter("@HyoujunGenkaTanka", SqlDbType.VarChar)
            {
                Value = shouhin_entity.HyoujunGenkaTanka
            };
            shouhin_entity.Sqlprms[19] = new SqlParameter("@ZeirituKBN", SqlDbType.Int)
            {
                Value = shouhin_entity.ZeirituKBN
            };
            shouhin_entity.Sqlprms[20] = new SqlParameter("@ZaikoHyoukaKBN", SqlDbType.Int)
            {
                Value = shouhin_entity.ZaikoHyoukaKBN
            };
            shouhin_entity.Sqlprms[21] = new SqlParameter("@ZaikoKanriKBN", SqlDbType.Int)
            {
                Value = shouhin_entity.ZaikoKanriKBN
            };
            shouhin_entity.Sqlprms[22] = new SqlParameter("@MainSiiresakiCD", SqlDbType.VarChar)
            {
                Value = shouhin_entity.MainSiiresakiCD
            };
            shouhin_entity.Sqlprms[23] = new SqlParameter("@ToriatukaiShuuryouDate", SqlDbType.VarChar)
            {
                Value = shouhin_entity.ToriatukaiShuuryouDate
            };
            shouhin_entity.Sqlprms[24] = new SqlParameter("@HanbaiTeisiDate", SqlDbType.VarChar)
            {
                Value = shouhin_entity.HanbaiTeisiDate
            };
            shouhin_entity.Sqlprms[25] = new SqlParameter("@Model_No", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Model_No
            };
            shouhin_entity.Sqlprms[26] = new SqlParameter("@Model_Name", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Model_Name
            };
            shouhin_entity.Sqlprms[27] = new SqlParameter("@FOB", SqlDbType.VarChar)
            {
                Value = shouhin_entity.FOB
            };
            shouhin_entity.Sqlprms[28] = new SqlParameter("@Shipping_Place", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Shipping_Place
            };
            shouhin_entity.Sqlprms[29] = new SqlParameter("@HacchuuLot", SqlDbType.Decimal)
            {
                Value = shouhin_entity.HacchuuLot
            };
            shouhin_entity.Sqlprms[30] = new SqlParameter("@ShouhinImageFilePathName", SqlDbType.VarChar)
            {
                Value = shouhin_entity.ImageFilePathName
            };

            shouhin_entity.Sqlprms[31] = new SqlParameter("@ShouhinImage", SqlDbType.VarBinary)
            {
                Value = shouhin_entity.Image
            };
            //shouhin_entity.Sqlprms[30] = new SqlParameter("@ShouhinImage", SqlDbType.Image) { Value = shouhin_entity.Image != null ? (object)shouhin_entity.Image : (object)DBNull.Value };

            shouhin_entity.Sqlprms[32] = new SqlParameter("@Remarks", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Remarks
            };

            shouhin_entity.Sqlprms[33] = new SqlParameter("@InsertOperator", SqlDbType.VarChar)
            {
                Value = shouhin_entity.InsertOperator
            };
            shouhin_entity.Sqlprms[34] = new SqlParameter("@UpdateOperator", SqlDbType.VarChar)
            {
                Value = shouhin_entity.UpdateOperator
            };
            shouhin_entity.Sqlprms[35] = new SqlParameter("@Mode", SqlDbType.VarChar)
            {
                Value = shouhin_entity.Mode
            };
            shouhin_entity.Sqlprms[36] = new SqlParameter("@Program", SqlDbType.VarChar)
            {
                Value = shouhin_entity.ProgramID
            };
            shouhin_entity.Sqlprms[37] = new SqlParameter("@PC", SqlDbType.VarChar)
            {
                Value = shouhin_entity.PC
            };
            shouhin_entity.Sqlprms[38] = new SqlParameter("@KeyItem", SqlDbType.VarChar)
            {
                Value = shouhin_entity.KeyItem
            };
            return(bl.InsertUpdateDeleteData("sp_Shouhin_IUD", shouhin_entity.Sqlprms));
        }