示例#1
0
 /// <summary>
 /// 更改Delivery表相关信息
 /// </summary>
 /// <param name="dn">dn</param>
 /// <param name="dnDate">dnDate</param>
 /// <param name="editor">editor</param>
 public void UpDN(string dn, string dnDate, string editor)
 { 
     logger.Debug("(_UpdateShipDate)UpDN start.");
     DNUpdateCondition myCondition = new DNUpdateCondition();
     myCondition.DeliveryNo = dn;
     myCondition.ShipDate = DateTime.Parse(dnDate);
     try
     {
         currentRepository.UpdateDNByCondition( myCondition,  editor);
     }
     catch (FisException e)
     {
         logger.Error(e.mErrmsg, e);
         throw new Exception(e.mErrmsg);
     }
     catch (Exception e)
     {
         logger.Error(e.Message, e);
         throw new SystemException(e.Message);
     }
     finally
     {
         logger.Debug("(_UpdateShipDate)UpDN end.");
     }
 }
示例#2
0
 /// <summary>
 /// 更改Delivery表相关信息
 /// </summary>
 /// <param name="dn">dn</param>
 /// <param name="dnDate">dnDate</param>
 /// <param name="editor">editor</param>
 public void UpDN(string dn, string dnDate, string editor)
 { 
     logger.Debug("(_UpdateShipDate)UpDN start.");
     DNUpdateCondition myCondition = new DNUpdateCondition();
     myCondition.DeliveryNo = dn;
     myCondition.ShipDate = DateTime.Parse(dnDate);
     try
     {
         UnitOfWork uow = new UnitOfWork();
         //currentRepository.UpdateDNByCondition( myCondition,  editor);
         currentRepository.UpdateDNByConditionDefered(uow, myCondition, editor);
         currentRepository.updateEDIPAKComnShipDateDefered(uow, dn, myCondition.ShipDate.ToString("yyyyMMdd"));
         uow.Commit();
     }
     catch (FisException e)
     {
         logger.Error(e.mErrmsg, e);
         throw new Exception(e.mErrmsg);
     }
     catch (Exception e)
     {
         logger.Error(e.Message, e);
         throw new SystemException(e.Message);
     }
     finally
     {
         logger.Debug("(_UpdateShipDate)UpDN end.");
     }
 }
示例#3
0
        /// <summary>
        /// 修改一条选中的DN
        /// </summary>
        /// <param name="UpdateDN"></param>
        /// <param name="editor"></param>
        void IPOData.ModifyDN(DNUpdateCondition UpdateDN, string editor)
        {
            logger.Debug("ModifyDN start, DeliveryNo:" + UpdateDN.DeliveryNo + " , editor:" + editor);

            try
            {
                currentDNRepository.UpdateDNByCondition(UpdateDN, editor);
            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg, e);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message, e);
                throw new SystemException(e.Message);
            }
            finally
            {
                logger.Debug("ModifyDN end, DeliveryNo:" + UpdateDN.DeliveryNo + " , editor:" + editor);
            }
        }
示例#4
0
        /// <summary>
        /// 保存当前DN信息
        /// </summary>
        /// <param name="deliveryNo"></param>
        /// <param name="UpdateDN"></param>
        /// <param name="deliverInfoID"></param>
        /// <param name="infoValue"></param>
        /// <param name="deliveryPalletID"></param>
        /// <param name="deliveryQty"></param>
        /// <param name="editor"></param>
        void IPOData.Save(string deliveryNo,DNUpdateCondition UpdateDN, int deliverInfoID, string infoValue, int deliveryPalletID, short deliveryQty, string editor)
        {
            logger.Debug("Save start, DeliveryNo:" + deliveryNo);

            try
            {
                IUnitOfWork dnWork = new UnitOfWork();
                if (UpdateDN != null)
                {
                    currentDNRepository.UpdateDNByConditionDefered(dnWork, UpdateDN, editor);
                }
                if (deliverInfoID > -1)
                {
                    currentDNRepository.UpdateDeliverInfoByIDDefered(dnWork, deliverInfoID, infoValue, editor);
                }
                if (deliveryPalletID > -1)
                {
                    currentDNRepository.UpdateDeliverQtyDefered(dnWork, deliveryPalletID, deliveryQty, editor);
                }

                dnWork.Commit();
            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg, e);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message, e);
                throw new SystemException(e.Message);
            }
            finally
            {
                logger.Debug("Save end, DeliveryNo:" + deliveryNo);
            }
        }
示例#5
0
    protected void btnButton2_ServerClick(object sender, EventArgs e)
    {
        try
        {
            if (HIfUpdate.Value == "doNotSave" )
            {
                ReSuccess("");
                return;
            }
            if (hidDN.Value != "")
            {
                string strDNNO = hidDN.Value;
                DNUpdateCondition condition = new DNUpdateCondition();
                condition.DeliveryNo = strDNNO;
                condition.ShipDate = DateTime.Parse(hidDate.Value);
                currentBll.UpDN(strDNNO, hidDate.Value, UserId);
                ReSuccessFull();
            }
            else if (hidCustsnList.Value != "")
            {
                string[] arr = hidCustsnList.Value.Split(',');
                foreach (string dn in arr)
                {

                    DNUpdateCondition condition = new DNUpdateCondition();
                    condition.DeliveryNo = dn.Trim();
                    condition.ShipDate = DateTime.Parse(hidDate.Value);
                    currentBll.UpDN(dn, hidDate.Value, UserId);
                }
                ReSuccessFull();
            }
            else
            {
                ReSuccess("NO DN Need Change");
                return;
            }


        }
        catch (FisException ex)
        {
            writeToAlertMessage(ex.mErrmsg);
            ReSuccess("");
        }
        catch (Exception ex)
        {
            writeToAlertMessage(ex.Message);
            ReSuccess("");
        }
        //ReSuccess("");
    }