Ejemplo n.º 1
0
        public void DeleteSOInterceptInfo(SOInterceptInfo info)
        {
            DataCommand command = DataCommandManager.GetDataCommand("BatchDeleteSOIntercept");

            command.ReplaceParameterValue("#SysNoString#", " SysNo IN (" + info.Sysnolist + ")");
            command.ExecuteNonQuery();
        }
Ejemplo n.º 2
0
        public void AddSOInterceptInfo(SOInterceptInfo info, string companyCode)
        {
            DataCommand command = DataCommandManager.GetDataCommand("AddSOInterceptInfo");

            command.SetParameterValue("@CompanyCode", companyCode);
            command.SetParameterValue("@ShipCategory", info.ShipTypeCategory);
            command.SetParameterValue("@WareHouseNumber", info.StockSysNo);
            command.SetParameterValue("@ShipTypeSysNo", info.ShippingTypeID);
            command.SetParameterValue("@HasTrackingNumber", string.IsNullOrEmpty(info.HasTrackingNumber) ? null : info.HasTrackingNumber);
            command.SetParameterValue("@ShipTimeType", string.IsNullOrEmpty(info.ShipTimeType) ? null : info.ShipTimeType);
            command.SetParameterValue("@EmailAddress", info.EmailAddress);
            command.SetParameterValue("@CCEmailAddress", info.CCEmailAddress);
            command.SetParameterValue("@FinanceEmailAddress", info.FinanceEmailAddress);
            command.SetParameterValue("@FinanceCCEmailAddress", info.FinanceCCEmailAddress);
            command.ExecuteNonQuery();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 删除选中的订单拦截信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            List <DynamicXml> list = new List <DynamicXml>();
            var dynamic            = this.searchResultsDataGrid.ItemsSource as dynamic;

            if (dynamic != null)
            {
                foreach (var item in dynamic)
                {
                    if (item.IsCheck == true)
                    {
                        list.Add(item);
                    }
                }
            }
            if (list.Count == 0)
            {
                this.Window.Alert(ResSO.Msg_PleaseSelect);
                return;
            }
            CPApplication.Current.CurrentPage.Context.Window.Confirm(ResSOIntercept.Info_Confirm_DeleteItem, (objConfirm, argsConfirm) =>
            {
                if (argsConfirm.DialogResult == DialogResultType.OK)
                {
                    SOInterceptInfo info = new SOInterceptInfo();
                    foreach (var item in list)
                    {
                        info.Sysnolist += "," + (int)item["SysNo"];
                    }
                    if (!string.IsNullOrEmpty(info.Sysnolist))
                    {
                        info.Sysnolist = info.Sysnolist.Remove(0, 1);
                        if (!string.IsNullOrEmpty(info.Sysnolist))
                        {
                            new SOInterceptFacade(this).DeleteSOInterceptInfo(info, (obj, args) =>
                            {
                                if (!args.FaultsHandle())
                                {
                                    searchResultsDataGrid.Bind();
                                }
                            });
                        }
                    }
                }
            });
        }
Ejemplo n.º 4
0
        public void BatchUpdateSOInterceptInfo(SOInterceptInfo info)
        {
            DataCommand   command  = null;
            StringBuilder updateSB = new StringBuilder();

            if (!string.IsNullOrEmpty(info.EmailAddress))
            {
                updateSB.Append(",h.[EmailAddress] = '" + info.EmailAddress + "'");
            }

            if (!string.IsNullOrEmpty(info.CCEmailAddress))
            {
                updateSB.Append(",h.[CCEmailAddress] = '" + info.CCEmailAddress + "'");
            }

            if (!string.IsNullOrEmpty(info.FinanceEmailAddress))
            {
                updateSB.Append(",h.[FinanceEmailAddress] = '" + info.FinanceEmailAddress + "'");
            }

            if (!string.IsNullOrEmpty(info.FinanceCCEmailAddress))
            {
                updateSB.Append(",h.[FinanceCCEmailAddress] = '" + info.FinanceCCEmailAddress + "'");
            }

            string updateString = updateSB.ToString();

            if (updateString.IndexOf(',') == 0)
            {
                updateString = updateString.Substring(1);
            }

            if (!string.IsNullOrEmpty(info.Sysnolist))
            {
                command = DataCommandManager.GetDataCommand("BatchUpdateSOInterceptInfo");

                command.ReplaceParameterValue("#UpdateString#", updateString);
                command.ReplaceParameterValue("#SysNoString#", " h.SysNo IN (" + info.Sysnolist + ")");
            }
            command.ExecuteNonQuery();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// 添加订单拦截设置
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     m_SOInterceptInfoVM = gdAddSOIntercept.DataContext as SOInterceptInfoVM;
     if (string.IsNullOrEmpty(m_SOInterceptInfoVM.ShippingTypeID) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.StockSysNo) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.HasTrackingNumber) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.ShipTimeType) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.EmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.CCEmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.FinanceEmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.FinanceCCEmailAddress)
         )
     {
         CPApplication.Current.CurrentPage.Context.Window.Alert(ResSOIntercept.Info_SaveSOIntercept_Input_Error, MessageType.Error);
     }
     else
     {
         ValidationManager.Validate(this.gdAddSOIntercept);
         if (m_SOInterceptInfoVM.HasValidationErrors && m_SOInterceptInfoVM.ValidationErrors.Count > 0)
         {
             return;
         }
         m_SOInterceptInfoVM.ShipTypeSysNo = Convert.ToInt32(m_SOInterceptInfoVM.ShippingTypeID);
         SOInterceptInfo req = m_SOInterceptInfoVM.ConvertVM <SOInterceptInfoVM, SOInterceptInfo>();
         new SOInterceptFacade(CPApplication.Current.CurrentPage).AddSOInterceptInfo(req, (obj, args) =>
         {
             if (!args.FaultsHandle())
             {
                 CPApplication.Current.CurrentPage.Context.Window.Alert(ResSOIntercept.Info_AddSOIntercept_Success, MessageType.Information);
                 CloseDialog(new ResultEventArgs
                 {
                     DialogResult = DialogResultType.OK
                 });
             }
         });
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 批量修改订单拦截设置
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnBatchUpdate_Click(object sender, RoutedEventArgs e)
 {
     m_SOInterceptInfoVM = gdUpdateSOIntercept.DataContext as SOInterceptInfoVM;
     CurrentSOInterceptInfoVM.Sysnolist = SysNoList;
     if (string.IsNullOrEmpty(m_SOInterceptInfoVM.EmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.CCEmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.FinanceEmailAddress) ||
         string.IsNullOrEmpty(m_SOInterceptInfoVM.FinanceCCEmailAddress)
         )
     {
         CPApplication.Current.CurrentPage.Context.Window.Alert(ResSOIntercept.Info_SaveSOIntercept_Input_Error, MessageType.Error);
     }
     else
     {
         ValidationManager.Validate(this.gdUpdateSOIntercept);
         if (m_SOInterceptInfoVM.HasValidationErrors && m_SOInterceptInfoVM.ValidationErrors.Count > 0)
         {
             return;
         }
         if (string.IsNullOrEmpty(CurrentSOInterceptInfoVM.Sysnolist))
         {
             CPApplication.Current.CurrentPage.Context.Window.Alert(ResSOIntercept.Info_SOIntercept_UpdateError_NoData, MessageType.Error);
         }
         SOInterceptInfo req = m_SOInterceptInfoVM.ConvertVM <SOInterceptInfoVM, SOInterceptInfo>();
         new SOInterceptFacade().BatchUpdateSOInterceptInfo(req, (obj, args) =>
         {
             if (!args.FaultsHandle())
             {
                 CPApplication.Current.CurrentPage.Context.Window.Alert(ResSOIntercept.Info_BatchUpdateSOIntercept_Success, MessageType.Information);
                 CloseDialog(new ResultEventArgs
                 {
                     DialogResult = DialogResultType.OK
                 });
             }
         });
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 添加订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 /// <param name="companyCode"></param>
 public virtual void AddSOInterceptInfo(SOInterceptInfo info, string companyCode)
 {
     m_da.AddSOInterceptInfo(info, companyCode);
 }
Ejemplo n.º 8
0
 public virtual void DeleteSOInterceptInfo(SOInterceptInfo info)
 {
     ObjectFactory <SOInterceptAppService> .Instance.DeleteSOInterceptInfo(info);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 批量修改订单拦截设置信息(修改对象可以为 CheckBox 选中的数据,也可能为页面查询条件查询出来的数据 需要Portal准备数据)
 /// </summary>
 /// <param name="info"></param>
 public virtual void BatchUpdateSOInterceptInfo(SOInterceptInfo info)
 {
     ObjectFactory <SOInterceptProcessor> .Instance.BatchUpdateSOInterceptInfo(info);
 }
Ejemplo n.º 10
0
 public virtual void AddSOInterceptInfo(SOInterceptInfo info)
 {
     ObjectFactory <SOInterceptAppService> .Instance.AddSOInterceptInfo(info, info.CompanyCode);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 批量修改订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 public void BatchUpdateSOInterceptInfo(SOInterceptInfo req, EventHandler <RestClientEventArgs <dynamic> > callback)
 {
     restClient.Update("/SOService/SO/BatchUpdateSOInterceptInfo", req, callback);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 添加订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 public void AddSOInterceptInfo(SOInterceptInfo req, EventHandler <RestClientEventArgs <dynamic> > callback)
 {
     req.CompanyCode = CPApplication.Current.CompanyCode;
     restClient.Create("/SOService/SO/AddSOInterceptInfo", req, callback);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 删除订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 public virtual void DeleteSOInterceptInfo(SOInterceptInfo info)
 {
     ObjectFactory <SOInterceptProcessor> .Instance.DeleteSOInterceptInfo(info);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 批量修改订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 public void BatchUpdateSOInterceptInfo(SOInterceptInfo info)
 {
     m_da.BatchUpdateSOInterceptInfo(info);
 }
Ejemplo n.º 15
0
 public virtual void BatchUpdateSOInterceptInfo(SOInterceptInfo info)
 {
     ObjectFactory <SOInterceptAppService> .Instance.BatchUpdateSOInterceptInfo(info);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 删除订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 public void DeleteSOInterceptInfo(SOInterceptInfo info)
 {
     m_da.DeleteSOInterceptInfo(info);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 添加订单拦截设置信息
 /// </summary>
 /// <param name="info"></param>
 /// <param name="companyCode"></param>
 public virtual void AddSOInterceptInfo(SOInterceptInfo info, string companyCode)
 {
     ObjectFactory <SOInterceptProcessor> .Instance.AddSOInterceptInfo(info, companyCode);
 }