private bool DoEdit(int _id) { bool result = false; BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); model.CustomerId = int.Parse(ddlCustomer.SelectedValue); model.StoreModeId = int.Parse(ddlStoreMode.SelectedValue); model.HandlingModeId = int.Parse(ddlHandlingMode.SelectedValue); model.UnitId = int.Parse(ddlUnit.SelectedValue); model.Name = txtName.Text; string[] attributeNames = Request.Form.GetValues("AttributeName"); string[] attributeValues = Request.Form.GetValues("AttributeValue"); string[] attributeRemarks = Request.Form.GetValues("AttributeRemark"); if (attributeNames != null && attributeValues != null && attributeRemarks != null && attributeNames.Length > 0 && attributeValues.Length > 0 && attributeRemarks.Length > 0) { for (int i = 0; i < attributeNames.Length; i++) { model.AddAttributeValues(new GoodsAttributeValues(attributeNames[i], attributeValues[i], attributeRemarks[i])); } } if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改客户信息:" + model.Name); //记录日志 result = true; } return(result); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string a = Request.QueryString["id"].ToString(); string types = (Request.QueryString["type"].ToString()); if (types == "0") { Label1.Text = "商品名称"; txt_name.Value = fmshif.GetModel(Convert.ToInt32(Request.QueryString["id"].ToString())).Goods_name; } else { Label1.Text = "费用名称"; txt_name.Value = fmcost.GetModel(Convert.ToInt32(Request.QueryString["id"].ToString())).ct_name; } } }
private void ShowInfo(int _id) { BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); txtName.Text = model.Name; txtCategroy.Text = model.CategoryName; txtCode.Text = model.Code; txtUnit.Text = model.Unit; }
protected void ddlGoods_SelectedIndexChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(ddlGoods.SelectedValue)) { BLL.Goods bll = new BLL.Goods(); Model.Goods m = bll.GetModel(Convert.ToInt32(ddlGoods.SelectedValue)); if (m != null) { txtUnit.Text = m.Unit; } } }
protected void ddlGoods_SelectedIndexChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(ddlGoods.SelectedValue)) { BLL.Goods bll = new BLL.Goods(); Model.Goods m = bll.GetModel(Convert.ToInt32(ddlGoods.SelectedValue)); if (m != null) { txtUnit.Text = m.Unit; } } }
public void BindEdit() { txtName.Value = fmcost.GetModel(Convert.ToInt32(ids)).Goods_name; txtBH.Value = fmcost.GetModel(Convert.ToInt32(ids)).Goods_number; txtPrice.Value = Convert.ToDecimal(fmcost.GetModel(Convert.ToInt32(ids)).Goods_price).ToString("0.##"); txtRemark.Value = fmcost.GetModel(Convert.ToInt32(ids)).Goods_Remaker; txt_unit.Value = fmcost.GetModel(Convert.ToInt32(ids)).Goods_unit; txt_Jf.Value = fmcost.GetModel(Convert.ToInt32(ids)).Goods_jf.ToString(); DDlfylb.SelectedValue = fmcost.GetModel(Convert.ToInt32(ids)).Goods_categories.ToString(); if (fmcost.GetModel(Convert.ToInt32(ids)).Goods_state == "使用") { radStatus.Checked = true; } else { radStatu.Checked = true; } }
/// <summary> /// 获得商品详情信息 /// </summary> private void GetGoodsInfo() { BLL.Goods bllgood = new BLL.Goods(); int id = Convert.ToInt32(context.Request.QueryString["id"]); Model.Goods modelgood = bllgood.GetModel(id); string res = string.Empty; if (modelgood != null) { res = js.Serialize(modelgood); } context.Response.Write(res); }
private void ShowInfo(int _id) { BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); ddlCustomer.SelectedValue = model.CustomerId.ToString(); ddlStoreMode.SelectedValue = model.StoreModeId.ToString(); ddlHandlingMode.SelectedValue = model.HandlingModeId.ToString(); ddlUnit.SelectedValue = model.UnitId.ToString(); txtName.Text = model.Name; BLL.GoodsAttributeValues attributeBLL = new BLL.GoodsAttributeValues(); DataTable attributeDT = attributeBLL.GetList(" GoodsId = " + _id + "").Tables[0]; this.rptAttributeList.DataSource = attributeDT; this.rptAttributeList.DataBind(); }
private bool DoEdit(int _id) { bool result = false; BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.CategoryName = txtCategroy.Text.Trim(); model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? "" : txtCode.Text.Trim(); model.Unit = txtUnit.Text.Trim(); if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改客户信息:" + model.Name); //记录日志 result = true; } return(result); }
public string Getname(int cid) { return(fmcost.GetModel(cid).Goods_name); }
private void ShowInfo(int _id) { BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); ddlCustomer.SelectedValue = model.CustomerId.ToString(); ddlStoreMode.SelectedValue = model.StoreModeId.ToString(); ddlHandlingMode.SelectedValue = model.HandlingModeId.ToString(); ddlUnit.SelectedValue = model.UnitId.ToString(); txtName.Text = model.Name; BLL.GoodsAttributeValues attributeBLL = new BLL.GoodsAttributeValues(); DataTable attributeDT = attributeBLL.GetList(" GoodsId = " + _id + "").Tables[0]; this.rptAttributeList.DataSource = attributeDT; this.rptAttributeList.DataBind(); }
private bool DoEdit(int _id) { bool result = false; BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); model.CustomerId = int.Parse(ddlCustomer.SelectedValue); model.StoreModeId = int.Parse(ddlStoreMode.SelectedValue); model.HandlingModeId = int.Parse(ddlHandlingMode.SelectedValue); model.UnitId = int.Parse(ddlUnit.SelectedValue); model.Name = txtName.Text; string[] attributeNames = Request.Form.GetValues("AttributeName"); string[] attributeValues = Request.Form.GetValues("AttributeValue"); string[] attributeRemarks = Request.Form.GetValues("AttributeRemark"); if (attributeNames != null && attributeValues != null && attributeRemarks != null && attributeNames.Length > 0 && attributeValues.Length > 0 && attributeRemarks.Length > 0) { for (int i = 0; i < attributeNames.Length; i++) { model.AddAttributeValues(new GoodsAttributeValues(attributeNames[i], attributeValues[i], attributeRemarks[i])); } } if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改客户信息:" + model.Name); //记录日志 result = true; } return result; }
private bool DoEdit(int _id) { bool result = false; BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.CategoryName = txtCategroy.Text.Trim(); model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? "" : txtCode.Text.Trim(); model.Unit = txtUnit.Text.Trim(); model.Variety = txtVariety.Text.Trim(); if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改客户信息:" + model.Name); //记录日志 result = true; } return result; }
private void ShowInfo(int _id) { BLL.Goods bll = new BLL.Goods(); Model.Goods model = bll.GetModel(_id); txtName.Text = model.Name; txtCategroy.Text = model.CategoryName; txtCode.Text = model.Code; txtUnit.Text = model.Unit; txtVariety.Text = model.Variety; }