public bool UpdateData(string UserID, ControlStockData csData) { bool ret = true; ProductMinMaxDAL oDAL = new ProductMinMaxDAL(); oDAL.GetDataByLOID(csData.LOID, null); oDAL.STANDARD = csData.STANDARD; oDAL.MINIMUM = csData.MINIMUM; oDAL.MAXIMUM = csData.MAXIMUM; oDAL.ACTIVE = 1; ret = oDAL.UpdateCurrentData(UserID, null); if (ret == false) _error = oDAL.ErrorMessage; return ret; }
private void UpdateData() { bool ret = true; ControlStockFlow csFlow = new ControlStockFlow(); ControlStockData csData = new ControlStockData(); csData.LOID = ControlStockFlow.GetProductMinMaxLOID(txtBarCode.Text.Trim(), Convert.ToDouble(this.txtWarehouse.Text).ToString()); if (txtStock.Text.Trim() != "") csData.STANDARD = Convert.ToDouble(txtStock.Text.Trim()); if (txtMinimum.Text.Trim() != "") csData.MINIMUM = Convert.ToDouble(txtMinimum.Text.Trim()); if (txtMaximum.Text.Trim() != "") csData.MAXIMUM = Convert.ToDouble(txtMaximum.Text.Trim()); ret = csFlow.UpdateData(Authz.CurrentUserInfo.UserID, csData); if (ret == false) Appz.ClientAlert(Page, csFlow.ErrorMessage); else { ClearControls(); SearchProductDetails(); Appz.ClientAlert(Page, "·Ó¡ÒÃá¡é䢢éÍÁÙŤǺ¤ØÁ»ÃÔÁÒ³ÊÔ¹¤éÒ/Çѵ¶Ø´ÔºàÃÕºÃéÍÂ"); } }
public bool InsertData(string UserID, ControlStockData csData) { bool ret = true; ProductMinMaxDAL oDAL = new ProductMinMaxDAL(); oDAL.PRODUCT = Convert.ToInt32(csData.PRODUCT); oDAL.WAREHOUSE = Convert.ToInt32(csData.WAREHOUSE); oDAL.STANDARD = csData.STANDARD; oDAL.MINIMUM = csData.MINIMUM; oDAL.MAXIMUM = csData.MAXIMUM; oDAL.ACTIVE = 1; ret = oDAL.InsertCurrentData(UserID, null); if (ret == false) _error = oDAL.ErrorMessage; return ret; }