提交代码
This commit is contained in:
@@ -35,6 +35,8 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
{
|
||||
GetButtonPower();
|
||||
this.ChangeId = Request.Params["ChangeId"];
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(drpMajor, true);
|
||||
BLL.DrawingService.InitDrawingDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
var Change = BLL.ChangeService.GetChangeById(this.ChangeId);
|
||||
if (Change != null)
|
||||
{
|
||||
@@ -42,9 +44,28 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
this.txtWorkSection.Text = Change.WorkSection;
|
||||
this.txtChangeNo.Text = Change.ChangeNo;
|
||||
this.txtChangeName.Text = Change.ChangeName;
|
||||
this.txtMajor.Text = Change.Major;
|
||||
this.drpMajor.SelectedValue = Change.Major;
|
||||
this.txtAcceptDate.Text = Change.AcceptDate.HasValue ? string.Format("{0:yyyy-MM-dd}", Change.AcceptDate) : "";
|
||||
this.txtCompletionStatus.Text = Change.CompletionStatus;
|
||||
if (Change.CompletionStatus == true)
|
||||
{
|
||||
this.cbCompletionStatus.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus.Checked = false;
|
||||
}
|
||||
if (Change.CompletionStatus2 == true)
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Change.DrawingId))
|
||||
{
|
||||
this.drpDrawingNo.SelectedValue = Change.DrawingId;
|
||||
}
|
||||
this.txtDutyPerson.Text = Change.DutyPerson;
|
||||
this.txtRemark.Text = Change.Remark;
|
||||
}
|
||||
@@ -63,18 +84,43 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (this.drpMajor.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpDrawingNo.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择原图纸号", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_Change newChange = new Model.QuantityManagement_Change();
|
||||
newChange.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newChange.WorkSection = this.txtWorkSection.Text.Trim();
|
||||
newChange.ChangeNo = this.txtChangeNo.Text.Trim();
|
||||
newChange.ChangeName = this.txtChangeName.Text.Trim();
|
||||
newChange.Major = this.txtMajor.Text.Trim();
|
||||
newChange.Major = this.drpMajor.SelectedValue;
|
||||
newChange.DrawingId = this.drpDrawingNo.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.txtAcceptDate.Text))
|
||||
{
|
||||
newChange.AcceptDate = Convert.ToDateTime(this.txtAcceptDate.Text);
|
||||
}
|
||||
newChange.CompletionStatus = this.txtCompletionStatus.Text.Trim();
|
||||
if (cbCompletionStatus.Checked)
|
||||
{
|
||||
newChange.CompletionStatus = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newChange.CompletionStatus = false;
|
||||
}
|
||||
if (cbCompletionStatus2.Checked)
|
||||
{
|
||||
newChange.CompletionStatus2 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newChange.CompletionStatus2 = false;
|
||||
}
|
||||
newChange.DutyPerson = this.txtDutyPerson.Text.Trim();
|
||||
newChange.Remark = this.txtRemark.Text.Trim();
|
||||
if (string.IsNullOrEmpty(this.ChangeId))
|
||||
|
||||
Reference in New Issue
Block a user