コード例 #1
0
ファイル: ShopListLogic.cs プロジェクト: viticm/pap2
 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;
 }
コード例 #2
0
ファイル: ShopListLogic.cs プロジェクト: viticm/pap2
 static public bool UpdateShopList(ShopList shoplist)
 {
     return App.AppVariables.g_dataprovider.UpdateShopList(shoplist);
 }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: viticm/pap2
 /// <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();
     }
 }
コード例 #4
0
ファイル: SqlDataProvider.cs プロジェクト: viticm/pap2
 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;
 }
コード例 #5
0
ファイル: SqlDataProvider.cs プロジェクト: viticm/pap2
 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);
 }
コード例 #6
0
ファイル: SqlDataProvider.cs プロジェクト: viticm/pap2
 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;
 }
コード例 #7
0
ファイル: SqlDataProvider.cs プロジェクト: viticm/pap2
 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;
 }