private void CheckByItem() { #region try { if (SLP_SKU1.Text.Trim() != "") { ALOModel.QueryALOCommon BCO = new ALOModel.QueryALOCommon(ConnectionDB); ArrayList ParameterList = new ArrayList();//20091113 ParameterList.Clear(); ParameterList.Add(SLP_SKU1.Text.Trim()); string strResult = BCO.CheckCurrentItemState(ParameterList); vItemStateDesc = strResult; if (vItemStateDesc != "") { rBtn_Active.Checked = false; rBtn_Inactive.Checked = true; boolStoreStateActive = false; lbl_StoreStatus.ForeColor = System.Drawing.Color.Red; btn_Check.Enabled = true; } else { rBtn_Active.Checked = true; rBtn_Inactive.Checked = false; boolStoreStateActive = true; lbl_StoreStatus.ForeColor = System.Drawing.Color.Empty; btn_Check.Enabled = false; } } } catch (Exception ex) { ErrorMsgLabel.Text = ex.Message; } #endregion }
/// <summary> /// 把值傳到Client端 /// </summary> /// <returns></returns> public string GetCallbackResult() { string rtn = "", strResult = ""; ALOModel.QueryALOCommon BCO = new ALOModel.QueryALOCommon(ConnectionDB); ALOModel.MaintainDisStoreMemo BCO2 = new ALOModel.MaintainDisStoreMemo(ConnectionDB); DataTable dt = null; string strChan_No = "", strChan_Name = "", strStore_Name = "", strItemStateDesc = ""; Int32 iResult = 0; ArrayList ParameterList = new ArrayList();//20091113 if (ObjectFrom.IndexOf("ITEM") != -1) { #region if (CallServerValue != "") { ParameterList.Clear(); ParameterList.Add(CallServerValue); strItemStateDesc = BCO.CheckCurrentItemState(ParameterList); } else { strItemStateDesc = "品號必填"; } rtn = string.Format("{0}", strItemStateDesc); #endregion } else if (ObjectFrom.IndexOf("STORE") != -1) { #region string[] strAry = CallServerValue.Split("_".ToCharArray()); ParameterList.Clear(); ParameterList.Add(strAry[0]);//Store dt = BCO2.QueryChanNoByStore(ParameterList); if (dt != null && dt.Rows.Count > 0) { strChan_No = dt.Rows[0][0].ToString().Trim(); strChan_Name = dt.Rows[0][1].ToString().Trim(); strStore_Name = dt.Rows[0][3].ToString().Trim(); if (strChan_No != strAry[1] && strAry[1] != "") strStore_Name = "查無資料"; } else { strStore_Name = "查無資料"; } rtn = string.Format("{0}-{1}-{2}", strChan_No, strChan_Name, strStore_Name); #endregion } //附加相關控制項 if (ObjectFrom.IndexOf("ITEM") != -1) { strResult = string.Format("{0};{1}", hiddenItemStateDesc.ClientID, rtn); } else if (ObjectFrom.IndexOf("STORE") != -1) { TextBox txtStoreChain2 = (TextBox)SLP_StoreChain2.FindControl("TextBoxCode"); strResult = string.Format("{0};{1}", txtStoreChain2.ClientID, rtn); } return strResult; }