Browse Source

重庆代码

master
TML 4 years ago
parent
commit
a09f33ff0f
  1. 75
      Controller/SCP_ASK_CONTROLLER.cs
  2. 2
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx
  3. 5
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs
  4. 4
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs
  5. 3
      SCP/Views/SupplierData/SCP_ASN_CREATE.aspx
  6. 1
      SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx
  7. 1
      SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs
  8. 18
      SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs
  9. 10
      SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx
  10. 27
      SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs
  11. 36
      SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs
  12. 4
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx
  13. 3
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs
  14. 19
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs
  15. 3
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx
  16. 1
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs
  17. 15
      SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs

75
Controller/SCP_ASK_CONTROLLER.cs

@ -920,6 +920,81 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static ResultObject<bool> Update_TB_ASK(TB_ASK p_entitys)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var ret= db.TB_ASK.Where(p => p.AskBillNum == p_entitys.AskBillNum).FirstOrDefault();
ret.Extend1 = p_entitys.Extend1;
db.TB_ASK.AddOrUpdate(ret);
if (db.SaveChanges() != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
}
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
{
var sb = new StringBuilder();
foreach (var error in dbEx.EntityValidationErrors.ToList())
{
error.ValidationErrors.ToList().ForEach(i =>
{
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage);
});
}
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", ex.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{
var inner = (UpdateException)ex.InnerException;
throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
}
else
{
if (ex.InnerException != null) throw ex.InnerException;
}
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
/// <summary>
///
/// </summary>

2
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx

@ -60,7 +60,7 @@
<%-- <f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口">
</f:DropDownList>--%>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
<f:TextBox ID="TXT_Remark" runat="server" Label="备注" Text="">
</f:TextBox>
</Items>

5
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs

@ -72,9 +72,8 @@ namespace SCP.PlanData
this.TXT_Site.Text = _result.Site_Desc;
this.TXT_State_DESC.Text = _result.State_DESC;
this.TXT_VendName.Text = _result.VendName;
this.txtRemark.Text = _result.Remark;
this.TXT_Remark.Text = _result.Extend1;
this.TXT_SubSite.Text = _result.SubSite;
this.TXT_Extend1.Text = _result.Extend1;
this.TXT_Extend2.Text = _result.Extend2;
this.TXT_Extend3.Text = _result.Extend3;
@ -157,7 +156,7 @@ namespace SCP.PlanData
{
var qadOrder = Session["order"] as V_TB_PO;
qadOrder.SubSite =TXT_SubSite.Text;
qadOrder.Extend1 = TXT_Extend1.Text;
qadOrder.Extend1 = TXT_Remark.Text;
qadOrder.Extend2 = TXT_Extend2.Text;
qadOrder.Extend3 = TXT_Extend3.Text;
//qadOrder.ReceivedPort = DDL_PORT.SelectedValue;

4
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

@ -159,13 +159,13 @@ namespace SCP.PlanData
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// txtRemark 控件。
/// TXT_Remark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.TextBox TXT_Remark;
/// <summary>
/// gp1 控件。

3
SCP/Views/SupplierData/SCP_ASN_CREATE.aspx

@ -40,7 +40,7 @@
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2">
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_2">
<Items>
<f:TextBox ID="TXT_PlateNumber" runat="server" Label="车牌/快递单号" />
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" />
@ -48,6 +48,7 @@
<f:DatePicker runat="server" Required ="true" Label="承诺到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" Readonly="false" CompareControl="DP_ShipTime" DateFormatString="yyyy-MM-dd HH:mm"
CompareOperator="GreaterThan" CompareMessage="到货日期应该大于发货日期"
ShowRedStar="True" />
<%-- <f:TextBox ID="TXT_KBremark" runat="server" Label="要货看板备注" /> --%>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" Hidden="true">

1
SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx

@ -50,6 +50,7 @@
<Items>
<f:TextBox runat = "server" Label = "车牌号" EmptyText = "" ID = "TXT_PlateNumber" />
<f:TextBox runat = "server" Label = "备注" EmptyText = "" ID = "TXT_Remark" />
<f:TextBox runat = "server" Label = "要货看板备注" EmptyText = "" ID = "TXT_KBremark"/>
</Items>
</f:FormRow>
</Items>

1
SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs

@ -72,6 +72,7 @@ namespace SCP.SupplierData
DP_ReceiveTime.SelectedDate = _result.ReceiveTime;
DP_ShipTime.SelectedDate = _result.ShipTime;
TXT_StateDesc.Text = _result.State_DESC;
TXT_KBremark.Text = _result.Extend1;
}
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj =>
{

18
SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs

@ -7,11 +7,10 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.SupplierData {
public partial class SCP_ASN_DETAIL {
namespace SCP.SupplierData
{
public partial class SCP_ASN_DETAIL
{
/// <summary>
/// form1 控件。
/// </summary>
@ -201,6 +200,15 @@ namespace SCP.SupplierData {
/// </remarks>
protected global::FineUI.TextBox TXT_Remark;
/// <summary>
/// TXT_KBremark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_KBremark;
/// <summary>
/// Toolbar1 控件。
/// </summary>

10
SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx

@ -32,6 +32,8 @@
</f:Button>
<f:Button ID="btnDeleted" runat="server" Hidden="true" EnablePostBack="True" OnClick="btnDeleted_Click" Text="删除明细内容" Icon="CssAdd" OnClientClick="if(!confirm('是否删除,明细将不可恢复?'))return false;">
</f:Button>
<f:Button ID="btnUpdate" runat="server" EnablePostBack="True" OnClick="btnUpdate_Click" Text="修改备注" Icon="BasketEdit" OnClientClick="if(!confirm('是否确定修改?'))return false;">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@ -49,12 +51,16 @@
</f:FormRow>
<f:FormRow runat="server" >
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="" Hidden="true">
</f:TextBox>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_BeginTime" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DP_EndTime" />
<f:TextBox ID="TXT_KBremark" runat="server" Label="备注" Text="" >
</f:TextBox>
<f:TextBox ID="TXT_AskBillNum" runat="server" Label="要货看板号" EmptyText="" Readonly="true">
</f:TextBox>
<f:Button ID="btnModifyDate" runat="server" Hidden="true" EnablePostBack="True" OnClick="btnModifyDate_Click" Text="修改明细记录订货和到货日期" Icon="CssAdd" OnClientClick="if(!confirm('是否修改明细订货和到货时间?'))return false;">
</f:Button>
</Items>
</f:FormRow>
</Items>

27
SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs

@ -57,7 +57,7 @@ namespace SCP.重庆北汽模塑.PlanData
this.btnRelease.Text = GetNameByKey(this.btnRelease.Text);
this.BTN_SAVE.Text = GetNameByKey(this.BTN_SAVE.Text);
this.btnCompleteForce.Text = GetNameByKey(this.btnCompleteForce.Text);
txtRemark.Label = GetNameByKey(txtRemark.Label);
TXT_KBremark.Label = GetNameByKey(TXT_KBremark.Label);
TXT_PoBillNum.Label = GetNameByKey(TXT_PoBillNum.Label);
TXT_Site.Label = GetNameByKey(TXT_Site.Label);
TXT_State_DESC.Label = GetNameByKey(TXT_State_DESC.Label);
@ -104,9 +104,10 @@ namespace SCP.重庆北汽模塑.PlanData
TXT_ModType.Text = _result.ModType.ToString();
TXT_State.Text = _result.State == null ? string.Empty : _result.State.Value.ToString();
this.TXT_VendName.Text = _result.VendName;
this.txtRemark.Text = _result.Remark;
this.TXT_KBremark.Text = _result.Extend1;
DP_BeginTime.SelectedDate = _result.BeginTime;
TXT_VendId.Text = _result.VendId;
TXT_AskBillNum.Text = _result.AskBillNum;
//DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID));
//DDL_PORT.DataBind();
//DDL_PORT.SelectedValue = _result.ReceivedPort;
@ -123,10 +124,12 @@ namespace SCP.重庆北汽模塑.PlanData
btnReduce.Hidden = true;
btnDeleted.Hidden = false;
btnModifyDate.Hidden = false;
}
//发布
//发布0
if (_result.State == (int)AskState.Release)
{
btnRelease.Hidden = true;
btnReleaseCancel.Hidden = false;
btnCompleteForce.Hidden = true;
@ -143,6 +146,7 @@ namespace SCP.重庆北汽模塑.PlanData
//确认
if (_result.State == (int)AskState.Confirm)
{
btnRelease.Hidden = true;
btnReleaseCancel.Hidden = true;
BTN_SAVE.Hidden = true;
@ -156,6 +160,7 @@ namespace SCP.重庆北汽模塑.PlanData
//作废
if (_result.State == (int)AskState.Reject)
{
btnRelease.Hidden = true;
btnReleaseCancel.Hidden = true;
btnReject.Hidden = true;
@ -205,7 +210,6 @@ namespace SCP.重庆北汽模塑.PlanData
{
SET_PO_STATE("发布成功!", AskState.Release);
}
protected void btnReleaseCancel_Click(object sender, EventArgs e)
{
SET_PO_STATE("取消发布成功!", AskState.New);
@ -335,6 +339,21 @@ namespace SCP.重庆北汽模塑.PlanData
Alert.Show(string.Join(",", ret.MessageList.ToArray()));
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
TB_ASK entity = new TB_ASK();
entity.AskBillNum = TXT_AskBillNum.Text;
entity.Extend1 = TXT_KBremark.Text;
var ret = SCP_ASK_CONTROLLER.Update_TB_ASK(entity);
if (ret.State == ReturnStatus.Succeed)
{
Alert.Show("修改成功");
}else
{
Alert.Show("修改失败");
}
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);

36
SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP..PlanData {
namespace SCP..PlanData
{
public partial class SCP_ASK_DETAIL {
public partial class SCP_ASK_DETAIL
{
/// <summary>
/// form1 控件。
@ -111,6 +113,15 @@ namespace SCP.重庆北汽模塑.PlanData {
/// </remarks>
protected global::FineUI.Button btnDeleted;
/// <summary>
/// btnUpdate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnUpdate;
/// <summary>
/// F_PO_DETAIL 控件。
/// </summary>
@ -166,31 +177,40 @@ namespace SCP.重庆北汽模塑.PlanData {
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// txtRemark 控件。
/// DP_BeginTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.DatePicker DP_BeginTime;
/// <summary>
/// DP_BeginTime 控件。
/// DP_EndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_BeginTime;
protected global::FineUI.DatePicker DP_EndTime;
/// <summary>
/// DP_EndTime 控件。
/// TXT_KBremark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_EndTime;
protected global::FineUI.TextBox TXT_KBremark;
/// <summary>
/// TXT_AskBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AskBillNum;
/// <summary>
/// btnModifyDate 控件。

4
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx

@ -43,7 +43,9 @@
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
<f:TextBox ID="SMRemark" runat="server" Label="说明" Text="">
</f:TextBox>
<f:TextBox ID="TXT_Remark" runat="server" Label="备注" Text="">
</f:TextBox>
</Items>
</f:FormRow>

3
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs

@ -90,7 +90,8 @@ namespace SCP.重庆北汽模塑
this.TXT_State_DESC.Text = _result.State_DESC;
TXT_ModType.Text = _result.ModType.ToString();
this.TXT_VendName.Text = _result.VendName;
this.txtRemark.Text = _result.Remark;
this.SMRemark.Text = _result.Remark;
this.TXT_Remark.Text = _result.Extend1;
DP_BeginTime.SelectedDate = _result.BeginTime;
}

19
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP. {
namespace SCP.
{
public partial class SCP_ASK_DETAIL {
public partial class SCP_ASK_DETAIL
{
/// <summary>
/// form1 控件。
@ -139,13 +141,22 @@ namespace SCP.重庆北汽模塑 {
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// txtRemark 控件。
/// SMRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.TextBox SMRemark;
/// <summary>
/// TXT_Remark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Remark;
/// <summary>
/// Grid_V_TB_ASK_DETAIL 控件。

3
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx

@ -36,7 +36,7 @@
<f:TextBox runat = "server" Enabled="false" Label = "发往地点" EmptyText = "" ID = "TXT_Site" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2">
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_2">
<Items>
<f:TextBox ID="TXT_PlateNumber" runat="server" Label="车牌/快递单号" />
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" />
@ -44,6 +44,7 @@
<f:DatePicker runat="server" Required ="true" Label="到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" Readonly="false" CompareControl="DP_ShipTime" DateFormatString="yyyy-MM-dd HH:mm"
CompareOperator="GreaterThan" CompareMessage="到货日期应该大于发货日期"
ShowRedStar="True" />
<f:TextBox ID="TXT_KBremark" runat="server" Label="要货看板备注" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" Hidden="true">

1
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs

@ -81,6 +81,7 @@ namespace SCP.重庆北汽模塑
this.TXT_State_Desc.Text = _result.State_DESC;
this.TXT_VendName.Text = _result.VendName;
this.TXT_Remark.Text = _result.Remark;
this.TXT_KBremark.Text = _result.Extend1;
DP_ShipTime.SelectedDate = DateTime.Now;
DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID));
DDL_PORT.DataBind();

15
SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP. {
namespace SCP.
{
public partial class SCP_ASN_CREATE {
public partial class SCP_ASN_CREATE
{
/// <summary>
/// form1 控件。
@ -156,6 +158,15 @@ namespace SCP.重庆北汽模塑 {
/// </remarks>
protected global::FineUI.DatePicker DP_ReceiveTime;
/// <summary>
/// TXT_KBremark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_KBremark;
/// <summary>
/// FormRow_3 控件。
/// </summary>

Loading…
Cancel
Save