Inheritance: KPOrderBase
 public virtual void UpdateKPOrder(KPOrder entity)
 {
     entityDao.UpdateKPOrder(entity);
 }
 public virtual void CreateKPOrder(KPOrder entity)
 {
     entityDao.CreateKPOrder(entity);
 }
 public virtual void DeleteKPOrder(KPOrder entity)
 {
     entityDao.DeleteKPOrder(entity);
 }
Exemple #4
0
    private void CreateFile(KPOrder kpOrder)
    {
        //随便写写,谁叫他们不给钱的
        #region 抽取数据导入文件
        string fileFolder = "D:\\Dss\\out\\";
        string fileName = "SCONIT_QAD_" + DateTime.Now.ToString("yyyyMMddhhmmss") + "_KPCONF.REQ";
        string[] line1 = new string[]
            {
                "1",
                kpOrder.QAD_ORDER_ID,
                DateTime.Now.ToShortDateString()
            };

        string[][] data = new string[][] { line1 };
        StreamWriter streamWriter = new StreamWriter(fileFolder + fileName, false, Encoding.GetEncoding(Encoding.Default.WebName));
        FlatFileWriter flatFileWriter = new FlatFileWriter(streamWriter, Environment.NewLine, "|");
        flatFileWriter.Write(data);
        flatFileWriter.Dispose();
        #endregion
    }
Exemple #5
0
 /*
  * 填充报表头
  *
  * Param repack 报验单头对象
  */
 private void FillHead(KPOrder kpOrder)
 {
     this.SetRowCell(8, 2, kpOrder.PARTY_FROM_ID);
     this.SetRowCell(8, 10, kpOrder.QAD_ORDER_ID);
 }
Exemple #6
0
    protected void UnBindSP(KPOrder kpOrder)
    {
        string[] cln_order = kpOrder.CLN_ORDER.Split(new char[] { ',' });

        foreach (string orderno in cln_order)
        {
            KPOrder ko = TheKPOrderMgr.LoadKPOrder(decimal.Parse(orderno));
            if (ko != null)
            {
                ko.CLN_ORDER = null;

                TheKPOrderMgr.UpdateKPOrder(ko);
            }
        }
        kpOrder.CLN_ORDER = null;
        kpOrder.CLN_amount = 0;
        TheKPOrderMgr.UpdateKPOrder(kpOrder);
    }
Exemple #7
0
 protected void process(KPOrder kpOrder)
 {
     if (string.IsNullOrEmpty(kpOrder.CLN_ORDER)
            && kpOrder.ORDER_TYPE_ID == "KP")
     {
         DetachedCriteria clnorder = DetachedCriteria.For<KPOrder>()
             .Add(Expression.Eq("ORDER_TYPE_ID", "SP"))
             .Add(Expression.IsNull("CLN_ORDER"))
             .Add(Expression.Eq("PARTY_FROM_ID", kpOrder.PARTY_FROM_ID))
             .Add(Expression.Eq("SYS_CODE",kpOrder.SYS_CODE));
         IList<KPOrder> kpcln = TheCriteriaMgr.FindAll<KPOrder>(clnorder);
         if (kpcln != null && kpcln.Count > 0)
         {
             decimal? tempamount = 0;
             decimal offsetamount = 0;
             decimal tempOrderAmount = kpOrder.TotalAmount;
             string _clnorder = string.Empty;
             // tempamount = kpOrder.InvoiceAmountWithoutTax;
             foreach (KPOrder kp in kpcln)
             {
                 tempamount = kp.TotalAmount;
                 if (tempamount.HasValue)
                 {
                     if (tempOrderAmount - tempamount > 0)
                     {
                         _clnorder += kp.ORDER_ID.ToString() + ",";
                         kp.CLN_ORDER = kpOrder.ORDER_ID.ToString();
                         offsetamount += (decimal)tempamount;
                         TheKPOrderMgr.UpdateKPOrder(kp);
                     }
                 }
             }
             //kpOrder.InvoiceAmountWithoutTax += offsetamount;
             kpOrder.CLN_amount = offsetamount;
             kpOrder.CLN_ORDER = _clnorder.Trim(new char[] { ',' });
             TheKPOrderMgr.UpdateKPOrder(kpOrder);
         }
     }
 }
 public virtual void DeleteKPOrder(KPOrder entity)
 {
     Delete(entity);
 }
 public virtual void UpdateKPOrder(KPOrder entity)
 {
     Update(entity);
 }
 public virtual void CreateKPOrder(KPOrder entity)
 {
     Create(entity);
 }