protected void Page_Load(object sender, EventArgs e) { site = new DBSite(); // show message that SMS balance is low and recharge int sms_bal = util.GetSMSBalance(site, Util_BLL.User.UserId); if (sms_bal != -99 && sms_bal < 1000) { lblBalance.Text = "Isufficient SMS Balance, should be greater than 1000 : " + sms_bal.ToString(); btnSendSMS.BackColor = System.Drawing.Color.LightGray; btnSendSMS.Enabled = false; } if (sms_bal == -99) { lblBalance.Text = "Remaining SMS : "; } else { lblBalance.Text = "Remaining SMS : " + sms_bal.ToString(); } if (!IsPostBack) { ClassMasterBLL cBll = new ClassMasterBLL(); List <ClassMasterBLL.ClassMasterEntity> clasList = cBll.GetClassList(site, Util_BLL.User.UserId); gridView2.DataSource = clasList; gridView2.DataBind(); ckbUnicode.Visible = Util_BLL.User.IsUnicode; btnTranslate.Visible = Util_BLL.User.IsUnicode; clear(); } if (Util_BLL.User.SMSDelivery > 20 && Util_BLL.User.SMSDelivery < 50) { lblError.Text = "Your SMS Balance is low. Please recharge for continued service!"; lblError.Visible = true; } if (Util_BLL.User.SMSDelivery < 20) { lblError.Text = "Your SMS Balance very low. Please recharge now to send SMS!"; lblError.Visible = true; btnSendSMS.BackColor = System.Drawing.Color.LightGray; btnSendSMS.Enabled = Util_BLL.User.SMSDelivery > 40; } }