コード例 #1
0
        private string BindName()
        {
            // Patient PatientObj = new Patient();
            Stocks stok = new Stocks();

            DataTable dt = stok.SearchBoxMedicine();

            StringBuilder output = new StringBuilder();
            output.Append("[");
            for (int i = 0; i < dt.Rows.Count; ++i)
            {
                output.Append("\"" + dt.Rows[i]["Name"].ToString() + "\"");

                if (i != (dt.Rows.Count - 1))
                {
                    output.Append(",");
                }
            }
            output.Append("]");
            return output.ToString();
        }
コード例 #2
0
        public static bool  ValidateMedicineName(string MedicineName)
        {
            Stocks StockObj = new Stocks();

            if (StockObj.ValidateMedicineName(MedicineName))
            {
                return true;
            }
            return false;
        }
コード例 #3
0
ファイル: Stock.aspx.cs プロジェクト: tvmindia/TheClinicApp
        protected void btnSearchMedicine_ServerClick(object sender, EventArgs e)
        {
           // Patient PatientObj = new Patient();

            Stocks stok = new Stocks();

            DataRow dr = null; 
            string Name = Request.Form["txtSearch"];
            if (Name != "")
            {
                DataTable dt = stok.GetMedcineDetails(Name);
                
                if (dt.Rows.Count>0)
                {
                    dr = dt.NewRow();
                    dr = dt.Rows[0];

                    HiddenFieldMedicineID.Value = dr["MedicineID"].ToString();
                    lblUnit.Text = dr["Unit"].ToString();
                    lblQuantity.Text = dr["Qty"].ToString();
                    lblLastUpdated.Text = dr["UpdatedDate"].ToString();
                }
                else
                {


                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('Medicine not Exists');", true);
                    
                    

                    
                  
                }


                
               
                
              
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('Invalid Suggesion');", true);

            }
        }