修改质量样板

This commit is contained in:
2023-02-14 17:40:34 +08:00
parent ca484ca4d6
commit fa156db08c
24 changed files with 1224 additions and 8 deletions
@@ -27,13 +27,23 @@ namespace FineUIPro.Web.CQMS.Models
{
this.btnSave.Hidden = true;
}
CompanyModelService.InitModelTypeDownList(this.drpModelType, true);
CompanyModelKindService.InitCompanyModelKindDownList(this.drpCompanyModelKindId, true);
this.drpCompanyModelKindId.SelectedValue = BLL.Const._Null;
//CompanyModelService.InitModelTypeDownList(this.drpModelType, true);
Funs.FineUIPleaseSelect(this.drpModelType);
if (!string.IsNullOrEmpty(id))
{
Model.Model_QualityModel QualityModel = BLL.QualityModelService.GetQualityModelById(id);
if (QualityModel != null)
{
this.hdId.Text = id;
Model.Base_CompanyModel companyModel = BLL.CompanyModelService.GetCompanyModelById(QualityModel.CompanyModelId);
if (!string.IsNullOrEmpty(companyModel.CompanyModelKindId))
{
this.drpCompanyModelKindId.SelectedValue = companyModel.CompanyModelKindId;
this.drpModelType.Items.Clear();
CompanyModelService.InitModelTypeDownList(this.drpModelType, this.drpCompanyModelKindId.SelectedValue, true);
}
if (!string.IsNullOrEmpty(QualityModel.CompanyModelId))
{
this.drpModelType.SelectedValue = QualityModel.CompanyModelId;
@@ -82,6 +92,11 @@ namespace FineUIPro.Web.CQMS.Models
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpCompanyModelKindId.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择样板类别!", MessageBoxIcon.Warning);
return;
}
if (this.drpModelType.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择样板类型!", MessageBoxIcon.Warning);
@@ -152,7 +167,7 @@ namespace FineUIPro.Web.CQMS.Models
/// </summary>
public void BindCGrid()
{
if (this.drpModelType.SelectedValue != BLL.Const._Null)
if (this.drpModelType.SelectedValue != BLL.Const._Null && this.drpCompanyModelKindId.SelectedValue != BLL.Const._Null)
{
string strSql = @"select * from AttachFile where ToKeyId='" + this.drpModelType.SelectedValue + "'";
DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
@@ -192,5 +207,17 @@ namespace FineUIPro.Web.CQMS.Models
{
BindCGrid();
}
protected void drpCompanyModelKindId_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpModelType.Items.Clear();
if (this.drpCompanyModelKindId.SelectedValue != BLL.Const._Null)
{
CompanyModelService.InitModelTypeDownList(this.drpModelType, this.drpCompanyModelKindId.SelectedValue, false);
}
Funs.FineUIPleaseSelect(this.drpModelType);
this.drpModelType.SelectedValue = BLL.Const._Null;
BindCGrid();
}
}
}