예제 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tinpreturndtl EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotinpreturndtl(tinpreturndtl tinpreturndtl)
 {
     base.AddObject("tinpreturndtl", tinpreturndtl);
 }
예제 #2
0
 /// <summary>
 /// Create a new tinpreturndtl object.
 /// </summary>
 /// <param name="retdtlsysid">Initial value of the retdtlsysid property.</param>
 /// <param name="retsysid">Initial value of the retsysid property.</param>
 /// <param name="custorderno">Initial value of the custorderno property.</param>
 /// <param name="styleno">Initial value of the styleno property.</param>
 /// <param name="color">Initial value of the color property.</param>
 /// <param name="size">Initial value of the size property.</param>
 /// <param name="customerid">Initial value of the customerid property.</param>
 public static tinpreturndtl Createtinpreturndtl(global::System.String retdtlsysid, global::System.String retsysid, global::System.String custorderno, global::System.String styleno, global::System.String color, global::System.String size, global::System.String customerid)
 {
     tinpreturndtl tinpreturndtl = new tinpreturndtl();
     tinpreturndtl.retdtlsysid = retdtlsysid;
     tinpreturndtl.retsysid = retsysid;
     tinpreturndtl.custorderno = custorderno;
     tinpreturndtl.styleno = styleno;
     tinpreturndtl.color = color;
     tinpreturndtl.size = size;
     tinpreturndtl.customerid = customerid;
     return tinpreturndtl;
 }
예제 #3
0
        private void DoReturn()
        {
            wsINP.IwsINPClient client = new wsINP.IwsINPClient();
             try
             {
                 baseForm.SetCursor();
                 baseForm.ValidateData(this);

                 if (UpdateMode == Public_UpdateMode.Insert)
                 {
                     inpreturn = new tinpreturn();
                     inpreturn.returnno = this.txtReturnNo.Text;
                     inpreturn.customerid = ((ValueInfo)this.cmbCustomer.SelectedItem).ValueField;
                     inpreturn.retsysid = Function.GetGUID();
                     inpreturn.returndate = Function.GetCurrentTime();
                     inpreturn.returnuser = Function.GetCurrentUser();
                 }
                 inpreturn.returntype = ((ValueInfo)this.cmbReturnType.SelectedItem).ValueField;
                 inpreturn.lastmodifiedtime = Function.GetCurrentTime();
                 inpreturn.lastmodifieduser = Function.GetCurrentUser();

                 List<tinpreturndtl> lstreturndtl = new List<tinpreturndtl>();

                 foreach (UltraGridRow row in this.grdDetail.Rows)
                 {
                     if (row.Cells["ck"].Value.ToString().Equals("Y"))
                     {
                         if (Convert.ToInt16(row.Cells["returnqty"].Value) == 0 && UpdateMode == Public_UpdateMode.Insert)
                         {
                             throw new Exception(UtilCulture.GetString("Msg.R01016", UtilCulture.GetString("Label.R02043")));
                         }
                         if (Convert.ToInt16(row.Cells["pairqty"].Value) < Convert.ToInt16(row.Cells["returnqty"].Value))
                         {
                             throw new Exception(UtilCulture.GetString("Msg.R01014", UtilCulture.GetString("Label.R02043"), UtilCulture.GetString("Label.R02026")));
                         }
                         tinpreturndtl returndtl = new tinpreturndtl();
                         returndtl.retdtlsysid = Function.GetGUID();
                         returndtl.retsysid = inpreturn.retsysid;
                         returndtl.customerid = inpreturn.customerid;
                         returndtl.custorderno = row.Cells["custorderno"].Value.ToString();
                         returndtl.styleno = row.Cells["styleno"].Value.ToString();
                         returndtl.color = row.Cells["color"].Value.ToString();
                         returndtl.size = row.Cells["size"].Value.ToString();
                         returndtl.checktype = row.Cells["checktype"].Value.ToString();
                         returndtl.pairqty = Convert.ToInt16(row.Cells["returnqty"].Value);
                         lstreturndtl.Add(returndtl);
                     }
                 }

                 if (lstreturndtl.Count == 0 && UpdateMode == Public_UpdateMode.Insert)
                 {
                     throw new Exception(UtilCulture.GetString("Msg.R01018"));
                 }

                 client.DoReturn(baseForm.CurrentContextInfo,inpreturn,lstreturndtl.ToArray<tinpreturndtl>());
                 baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00002"));
                 this.Close();

             }
             catch (Exception ex)
             {
                 baseForm.CreateMessageBox(Public_MessageBox.Error, MessageBoxButtons.OK, null, ex.Message);
             }
             finally
             {
                 baseForm.ResetCursor();
                 baseForm.CloseWCF(client);
             }
        }