コード例 #1
0
ファイル: FrmToSupp.cs プロジェクト: khanhnguyen18/tvqlLib
 private void btn_Delete_Click(object sender, EventArgs e)
 {
     if (Class11.string_0 == "F")
     {
         string str2   = this.Txt_TransNum.Text.Trim();
         string str3   = this.Txt_ExpID.Text.Trim();
         Class6 class2 = new Class6();
         string text   = this.btn_Delete.Text;
         if (text != null)
         {
             if (!(text == "&X\x00f3a"))
             {
                 if ((text == "&Phục hồi") && (Class7.ShowMessageBox("Bạn c\x00f3 chắc chắn phục hồi giao dịch n\x00e0y kh\x00f4ng ?", 2) == 1))
                 {
                     class2.method_14("tblTransaction", str2, 1);
                     class2.method_19(str2);
                     class2.method_9(str2, str3);
                     this.btn_Skip_Click(this, new EventArgs());
                 }
             }
             else if (Class7.ShowMessageBox("Bạn c\x00f3 chắc chắn x\x00f3a giao dịch n\x00e0y kh\x00f4ng ?", 2) == 1)
             {
                 class2.method_20(str2);
                 class2.method_10(str2);
                 class2.method_14("tblTransaction", str2, 0);
                 this.btn_Skip_Click(this, new EventArgs());
             }
         }
     }
 }
コード例 #2
0
ファイル: FrmToSupp.cs プロジェクト: khanhnguyen18/tvqlLib
 private void btn_Save_Click(object sender, EventArgs e)
 {
     if (this.Lbl_ImpName.Text == string.Empty)
     {
         Class7.ShowMessageBox("Bạn chưa khai b\x00e1o nơi nhập h\x00e0ng", 1);
         this.Txt_ImpID.Focus();
     }
     else if (this.Lbl_ExpName.Text == string.Empty)
     {
         Class7.ShowMessageBox("Bạn chưa khai b\x00e1o nơi xuất h\x00e0ng", 1);
         this.Txt_ExpID.Focus();
     }
     else if (this.TransDetail.RowCount == 0)
     {
         this.Txt_GoodsId.Focus();
     }
     else
     {
         string str2 = this.Txt_TransNum.Text.Trim();
         string str3 = this.Txt_ExpID.Text.Trim();
         string str4 = this.Txt_ImpID.Text.Trim();
         string str5 = this.Txt_Remark.Text.Trim();
         string str6 = this.Txt_Voucher.Text.Trim();
         if (this.TransDetail.RowCount != 0)
         {
             Class6 class2 = new Class6();
             string str    = Class11.string_0;
             if (str != null)
             {
                 if (!(str == "N"))
                 {
                     if (str == "E")
                     {
                         this.btn_Skip_Click(this, new EventArgs());
                         class2.method_20(str2);
                         class2.method_10(str2);
                         class2.method_13(str2);
                         class2.method_6(this.string_0, str2, this.string_1, str3, str4, str6, str5, this.string_3);
                         class2.method_9(str2, str3);
                     }
                 }
                 else
                 {
                     this.btn_Skip_Click(this, new EventArgs());
                     class2.ComputeTransnum("K");
                     string str7 = Class7.smethod_53();
                     class2.method_6(this.string_0, str2, this.string_1, str3, str4, str6, str5, str7);
                     class2.method_19(str2);
                     class2.method_9(str2, str3);
                 }
             }
             Class6.transNum = str2;
             v_tosupp sup = new v_tosupp();
             sup.ShowPreviewDialog();
         }
     }
 }
コード例 #3
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            string str7;
            string str  = this.Txt_TransNum.Text.Trim();
            string str2 = this.Txt_OldTrans.Text.Trim();
            string str3 = this.Txt_ExpID.Text.Trim();
            string str4 = this.Txt_ImpID.Text.Trim();
            string str5 = this.Txt_Remark.Text.Trim();
            string str6 = this.Txt_Voucher.Text.Trim();

            if (this.TransDetail.RowCount == 0)
            {
                return;
            }
            Class6 class2 = new Class6();

            if (!class2.method_22())
            {
                this.string_4           = "select goods_id, imp_id, qty from tblTransaction where trans_num = '" + str2 + "'";
                this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_4, this.oleDbConnection_1);
                using (DataTable table = new DataTable())
                {
                    this.oleDbDataAdapter_0.Fill(table);
                    this.oleDbConnection_1.Close();
                    IEnumerator enumerator = table.Rows.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        DataRow current = (DataRow)enumerator.Current;
                        if (class2.method_21(current["goods_id"].ToString(), current["imp_id"].ToString()) < Class7.smethod_2(current["qty"]))
                        {
                            goto Label_0149;
                        }
                    }
                    goto Label_0183;
Label_0149:
                    Class7.ShowMessageBox("Số lượng tồn kh\x00f4ng đủ để xuất kho !", 1);
                    return;
                }
            }
Label_0183:
            str7 = Class11.string_0;
            if (str7 != null)
            {
                if (!(str7 == "N"))
                {
                    if (str7 == "E")
                    {
                        this.btn_Skip_Click(this, new EventArgs());
                        class2.method_20(str);
                        class2.method_10(str);
                        class2.method_13(str);
                        class2.method_6(this.string_0, str, this.string_1, str3, str4, str6, str5, this.string_3);
                        class2.method_9(str, str3);
                    }
                }
                else
                {
                    this.btn_Skip_Click(this, new EventArgs());
                    class2.ComputeTransnum("K");
                    this.ddvqeXfa4(this.string_0, str, this.string_1, str3, str4, str6, str5);
                    class2.method_19(str);
                    class2.method_9(str, str3);
                }
            }
            Class6.transNum = str;
            Class7.CreateReportInstance(Class6.string_3).ShowPreviewDialog();
        }