Exemple #1
0
 static public ShopList AddShopList(ShopList shoplist)
 {
     if (false == App.AppVariables.g_dataprovider.IsShopListExists(shoplist.ShopName))
     {
         return App.AppVariables.g_dataprovider.AddShopList(shoplist);
     }
     else
         return null;
 }
Exemple #2
0
 static public bool UpdateShopList(ShopList shoplist)
 {
     return App.AppVariables.g_dataprovider.UpdateShopList(shoplist);
 }
Exemple #3
0
 /// <summary>
 /// 保存新商店列表
 /// </summary>
 private void _saveNewShopList()
 {
     if (txtShopName.Text != "" &&
         txtShopConfigFile.Text != "")
     {
         ShopList shoplist = new ShopList();
         shoplist.ShopName = this.tvShopList.SelectedNode.Text;
         shoplist.CanRepair = this.chkShopCanFix.Checked;
         shoplist.ConfigFile = this.txtShopConfigFile.Text;
         ShopList retobj = ShopListLogic.AddShopList(shoplist);
         if (null != retobj)
         {
             MessageBox.Show("新商店创建成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         }
         _initShopList();
     }
 }
Exemple #4
0
 private ShopList _buildShopList(ref SqlDataReader sdr)
 {
     if (null == sdr || false == sdr.HasRows) return null;
     ShopList shoplist = new ShopList();
     shoplist.RECID = Convert.ToInt32(sdr["RECID"]);
     shoplist.ShopID = Convert.ToInt32(sdr["ShopID"]);
     shoplist.ShopTemplateID = Convert.ToInt32(sdr["ShopTemplateID"]);
     shoplist.CanRepair = Convert.ToBoolean(sdr["CanRepair"]);
     shoplist.ConfigFile = Convert.ToString(sdr["ConfigFile"]);
     shoplist.ShopName = Convert.ToString(sdr["ShopName"]);
     return shoplist;
 }
Exemple #5
0
 public bool UpdateShopList(ShopList shoplist)
 {
     this._setShopListParamValues(ref this.m_shoplistParams4Update, shoplist);
     int iret = m_db.RunProc2(this.m_Proc_UpdateShopList, this.m_shoplistParams4Update, true);
     return (iret == 0);
 }
Exemple #6
0
 public ShopList AddShopList(ShopList shoplist)
 {
     ShopList obj = null;
     this._setShopListParamValues(ref m_shoplistParams4Add, shoplist);
     int iret = m_db.RunProc2(this.m_Proc_AddShopList,this.m_shoplistParams4Add, true);
     obj = GetOneShopList(iret);
     return obj;
 }
Exemple #7
0
 private void _setShopListParamValues(ref SqlParameter[] parm, ShopList shoplist)
 {
     parm[0].Value = shoplist.ShopID;
     parm[1].Value = shoplist.ShopTemplateID;
     parm[2].Value = shoplist.ShopName;
     parm[3].Value = shoplist.ConfigFile;
     parm[4].Value = shoplist.CanRepair;
 }