Esempio n. 1
0
 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());
             }
         }
     }
 }
Esempio n. 2
0
        private void btn_Delete_Click(object sender, EventArgs e)
        {
            if (this.string_3 != "F")
            {
                return;
            }
            string str    = this.Txt_TransNum.Text.Trim();
            string str2   = this.cmbImport.Text.Trim();
            Class6 class2 = new Class6();
            string text   = this.btn_Delete.Text;

            if (text == null)
            {
                return;
            }
            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", str, 1);
                    class2.method_17(str);
                    class2.method_7(str, str2);
                    this.btn_Skip_Click(this, new EventArgs());
                }
                return;
            }
            if (!class2.method_22())
            {
                this.string_2           = "select goods_id, imp_id, qty from tblTransaction where trans_num = '" + str + "'";
                this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_2, this.oleDbConnection_0);
                using (DataTable table = new DataTable())
                {
                    this.oleDbDataAdapter_0.Fill(table);
                    this.oleDbConnection_0.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_0174;
                        }
                    }
                    goto Label_01AB;
Label_0174:
                    Class7.ShowMessageBox("Số lượng tồn kh\x00f4ng đủ để x\x00f3a giao dịch n\x00e0y !", 1);
                    return;
                }
            }
Label_01AB:
            if (Class7.ShowMessageBox("Bạn c\x00f3 chắc chắn x\x00f3a giao dịch n\x00e0y kh\x00f4ng ?", 2) == 1)
            {
                class2.method_18(str);
                class2.method_8(str);
                class2.method_14("tblTransaction", str, 0);
                this.btn_Skip_Click(this, new EventArgs());
            }
        }
Esempio n. 3
0
 private void btn_Delete_Click(object sender, EventArgs e)
 {
     if (Class11.string_0 == "F")
     {
         string str    = this.txtTransNum.Text.Trim();
         string str4   = Class7.smethod_40();
         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 phiếu n\x00e0y kh\x00f4ng ?", 2) == 1))
                 {
                     class2.method_14("tblLoantran", str, 1);
                     for (int i = 0; i < this.dataSet_0.Tables["loantran"].Rows.Count; i++)
                     {
                         string str3 = this.dataSet_0.Tables["loantran"].Rows[i]["goods_id"].ToString();
                         Class2.iWyIskLbe(str4, str3, 1.0);
                     }
                     this.btn_Skip_Click(this, new EventArgs());
                 }
             }
             else if (!Class2.smethod_4(this.txtTransNum.Text))
             {
                 Class7.ShowMessageBox("Phiếu n\x00e0y đ\x00e3 c\x00f3 s\x00e1ch được trả kh\x00f4ng thể x\x00f3a", 1);
             }
             else if (Class7.ShowMessageBox("Bạn c\x00f3 chắc chắn x\x00f3a phiếu n\x00e0y kh\x00f4ng ?", 2) == 1)
             {
                 class2.method_14("tblLoantran", str, 0);
                 Class2.smethod_0(str);
                 this.btn_Skip_Click(this, new EventArgs());
             }
         }
     }
 }