Ejemplo n.º 1
0
    private void saveCodeInfo(string strGbn)
    {
        if (!ValidateEtcForm())
        {
            return;
        }

        Biz_Com_Code_Info objCode = new Biz_Com_Code_Info();

        objCode.Itype          = strGbn;
        objCode.Icode_info_id  = (objCode.Itype == "U") ? int.Parse(hdnCodeInfoID.Value.ToString()) : 0;
        objCode.Icategory_code = txtSCatCode.Text;
        objCode.Ietc_code      = txtEtcCode.Text;
        objCode.Icode_name     = txtEtcName.Text;
        objCode.Icode_desc     = txtEtcDesc.Text;
        objCode.Isort_order    = (txtSortOrder.Text.Trim() == "") ? 0 : int.Parse(txtSortOrder.Text.ToString());
        objCode.Iuse_yn        = (chkSUseYn.Checked) ? "Y" : "N";
        objCode.Isegment1      = txtSegment1.Text;
        objCode.Isegment2      = txtSegment2.Text;
        objCode.Isegment3      = txtSegment3.Text;
        objCode.Isegment4      = txtSegment4.Text;
        objCode.Isegment5      = txtSegment5.Text;
        objCode.InsertData(objCode.Icode_info_id, objCode.Icategory_code, objCode.Ietc_code, objCode.Icode_name, objCode.Icode_desc,
                           objCode.Isort_order, objCode.Iuse_yn, objCode.Isegment1, objCode.Isegment2, objCode.Isegment3, objCode.Isegment4, objCode.Isegment5, gUserInfo.Emp_Ref_ID);

        ltlMsg.Text = JSHelper.GetAlertScript(objCode.Transaction_Message, false);
        this.refreshCodeGrid(txtSCatCode.Text);
    }