コード例 #1
0
ファイル: ParamTests.cs プロジェクト: shlok57/BoilerPlateApp
        public void GetAllParamNames()
        {
            ParamBL           paramBL   = new ParamBL();
            string            paramName = "testParamName";
            int               paramId   = paramBL.StoreParamName(paramName);
            List <ParamValue> values    = new List <ParamValue>();

            values = paramBL.GetAllParamNames();
            ParamValue value = values.Find(x => x.Id == paramId);

            Assert.AreEqual(paramName, value.Name);
        }
コード例 #2
0
        private void Btn_AddParamName_Click(object sender, EventArgs e)
        {
            txt_conf.Visible = true;
            string paramName = txt_paramName.Text;

            if (string.IsNullOrEmpty(paramName))
            {
                txt_conf.Text = "Enter Name";
            }
            else
            {
                txt_conf.Text = paramBL.StoreParamName(paramName) != -1 ? "Parameter Name Saved" : "Some Error Happened";
            }

            return;
        }