Exemple #1
0
 public bool Update(YB_DP_Item_Swap yb)
 {
     ABi_Company abi_company = new ABi_Company();
     string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
     if (string.IsNullOrEmpty(company_id) == false)
     {
         this.invoiceNumber = yb.Invoice_no;
         string selStr = "update ABi_Invoice set PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + this.invoiceNumber + "' and aBi_Company_ID='" + company_id + "' and PaymentStatus not in('3','4')";
         return this.ExecCommand(selStr);
     }
     else
         return false;
 }
Exemple #2
0
 public bool Update(YB_Miro_IV_Swap yb)
 {
     ABi_Company abi_company = new ABi_Company();
     string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
     if (string.IsNullOrEmpty(company_id) == false)
     {
         this.iVNumber = yb.Belnr;
         this.invoiceNumber = yb.Invoice_no;
         this.dueDate = yb.Zfbdt;
         this.IVPostDate = yb.Budat;
         this.aBi_Company_ID = Convert.ToInt32(company_id);
         this.payAmount = yb.Dmbtr;
         string selStr = "update ABi_Invoice set payAmount='" + this.payAmount + "', PaymentStatus='" + yb.Status_i + "',iVNumber='" + iVNumber + "',dueDate='" + dueDate + "',IVPostDate='" + IVPostDate + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + aBi_Company_ID + "' and PaymentStatus!=4";
         return this.ExecCommand(selStr);
     }
     else
         return false;
 }
Exemple #3
0
 public bool Update(YB_Payment_Report_Swap yb)
 {
     //是否只是更新invocestatus,paymentStatus要不要改
     ABi_Company abi_company = new ABi_Company();
     string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
     if (string.IsNullOrEmpty(company_id) == false)//如果系统里面找不到这个company
     {
         //如果原先没IVNuber的话 去IV找出IVNuber赋值进取
         this.invoiceNumber = yb.Invoice_no;//是用yb.Invoice_no还是bukrs 需要确定唯一主建
         this.datePayment = yb.Budat;
         string selStr = "update ABi_Invoice set datePayment='" + datePayment + "',PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + company_id + "'";
         return this.ExecCommand(selStr);
     }
     else
         return false;
 }
 public bool Update(YB_DP_Item_Swap yb)
 {
     ABi_Company abi_company = new ABi_Company();
     string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
     if (string.IsNullOrEmpty(company_id) == false)
     {
         this.invoiceNumber = yb.Invoice_no;
         if (String.IsNullOrEmpty(yb.Lifnr) || yb.Lifnr.Trim().Length < 6)
         {
             string selStr = "update ABi_Invoice set PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + this.invoiceNumber + "' and aBi_Company_ID='" + company_id + "' and PaymentStatus not in('3','4')";
             return this.ExecCommand(selStr);
         }
         else
         {
             String strVC = yb.Lifnr.Trim();
             ABi_Vendor v = new ABi_Vendor(strVC.Substring(strVC.Length - 6));
             string selStr = String.Format(@"update ABi_Invoice set PaymentStatus='{0}' where
                                             InvoiceNumber='{1}' and
                                             ABi_Company_ID='{2}' and
                                             ABi_Vendor_ID='{3}' and
                                             LEFT(InvoiceDate, 4) = '{4}' and  PaymentStatus not in('3','4')",
                                             yb.Status_i, invoiceNumber, company_id, v.ABi_Vendor_ID, yb.Invoice_date.Year); // "update ABi_Invoice set PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + this.invoiceNumber + "' and aBi_Company_ID='" + company_id + "' and PaymentStatus not in('3','4')";
             return this.ExecCommand(selStr);
         }
     }
     else
         return false;
 }
        public bool Update(YB_Miro_IV_Swap yb)
        {
            ABi_Company abi_company = new ABi_Company();
            string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
            if (string.IsNullOrEmpty(company_id) == false)
            {
                this.iVNumber = yb.Belnr;
                this.invoiceNumber = yb.Invoice_no;
                this.dueDate = yb.Zfbdt;
                this.IVPostDate = yb.Budat;
                this.aBi_Company_ID = Convert.ToInt32(company_id);
                this.payAmount = yb.Dmbtr;

                if (String.IsNullOrEmpty(yb.Lifnr) || yb.Lifnr.Trim().Length < 6)
                {
                    string selStr = "update ABi_Invoice set payAmount='" + this.payAmount + "', PaymentStatus='" + yb.Status_i + "',iVNumber='" + iVNumber + "',dueDate='" + dueDate + "',IVPostDate='" + IVPostDate + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + aBi_Company_ID + "' and PaymentStatus!=4";
                    return this.ExecCommand(selStr);
                }
                else
                {
                    String strVC = yb.Lifnr.Trim();
                    ABi_Vendor v = new ABi_Vendor(strVC.Substring(strVC.Length - 6));
                    string selStr = String.Format(@"update ABi_Invoice set payAmount='{0}', PaymentStatus='{1}', IVNumber={2}, DueDate='{3}', IVPostDate='{4}' where
                                                    InvoiceNumber='{5}' and
                                                    ABi_Company_ID='{6}' and
                                                    ABi_Vendor_ID='{7}' and
                                                    LEFT(InvoiceDate, 4) = '{8}' and  PaymentStatus != 4 ",
                                                    payAmount, yb.Status_i, iVNumber, DueDate, IVPostDate,
                                                   invoiceNumber, company_id, v.ABi_Vendor_ID, yb.Invoice_date.Year); // "update ABi_Invoice set payAmount='" + this.payAmount + "', PaymentStatus='" + yb.Status_i + "',iVNumber='" + iVNumber + "',dueDate='" + dueDate + "',IVPostDate='" + IVPostDate + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + aBi_Company_ID + "' and PaymentStatus!=4";
                    return this.ExecCommand(selStr);

                }
            }
            else
                return false;
        }
 public bool Update(YB_Payment_Report_Swap yb)
 {
     //是否只是更新invocestatus,paymentStatus要不要改
     ABi_Company abi_company = new ABi_Company();
     string company_id = abi_company.GetCompanyCodeByID(yb.Bukrs);
     if (string.IsNullOrEmpty(company_id) == false)//如果系统里面找不到这个company
     {
         //如果原先没IVNuber的话 去IV找出IVNuber赋值进取
         this.invoiceNumber = yb.Invoice_no;//是用yb.Invoice_no还是bukrs 需要确定唯一主建
         this.datePayment = yb.Budat;
         if (String.IsNullOrEmpty(yb.Lifnr) || yb.Lifnr.Trim().Length < 6)
         {
             string selStr = "update ABi_Invoice set datePayment='" + datePayment + "',PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + company_id + "'";
             return this.ExecCommand(selStr);
         }
         else
         {
             String strVC = yb.Lifnr.Trim();
             ABi_Vendor v = new ABi_Vendor(strVC.Substring(strVC.Length - 6));
             string selStr = String.Format(@"update ABi_Invoice set datePayment='{0}', PaymentStatus='{1}' where
                                             InvoiceNumber='{2}' and
                                             ABi_Company_ID='{3}' and
                                             ABi_Vendor_ID='{4}' and
                                             LEFT(InvoiceDate, 4) = '{5}'",
                                             datePayment, yb.Status_i,
                                             invoiceNumber, company_id, v.ABi_Vendor_ID, yb.Invoice_date.Year); // "update ABi_Invoice set datePayment='" + datePayment + "',PaymentStatus='" + yb.Status_i + "' where invoiceNumber='" + invoiceNumber + "' and aBi_Company_ID='" + company_id + "'";
             return this.ExecCommand(selStr);
         }
     }
     else
         return false;
 }