protected void grdSearchResult_SelectedIndexChanged(object sender, EventArgs e) { lblUpdateId.Text = grdSearchResult.SelectedRow.Cells[1].Text == " " ? "" : grdSearchResult.SelectedRow.Cells[1].Text; txtEntryDate.Text = grdSearchResult.SelectedRow.Cells[2].Text == " " ? "" : grdSearchResult.SelectedRow.Cells[2].Text; txtRemark.Text = grdSearchResult.SelectedRow.Cells[3].Text == " " ? "" : grdSearchResult.SelectedRow.Cells[3].Text; txtPaidAmount.Text = ((Label)grdSearchResult.SelectedRow.FindControl("lblAmount")).Text; PrjClass.SetItemInDropDown(cmbDrExpenses1, ((Label)grdSearchResult.SelectedRow.FindControl("lblAccountType")).Text, true, false); txtEntryDate.Attributes.Add("onfocus", "javascript:select();"); txtEntryDate.Focus(); btnAddNewExpense.Visible = false; btnDelete.Visible = true; btnUpdate.Visible = true; btnRename.Visible = true; bool rights = AppClass.CheckButtonRights(SpecialAccessRightName.LedgerRight); bool rights1 = AppClass.CheckButtonRights(SpecialAccessRightName.EditAndDelExp); if (rights == true) { btnRename.Visible = true; } else { btnRename.Visible = false; } if (rights1 == true) { btnDelete.Visible = true; btnUpdate.Visible = true; } else { btnDelete.Visible = false; btnUpdate.Visible = false; } }
private void checkrights() { bool rights = AppClass.CheckButtonRights(SpecialAccessRightName.LedgerRight); if (rights == true) { btnAddNewLedger.Visible = true; } else { btnAddNewLedger.Visible = false; } }
public void ShowDefaultDiscountButton() { bool blnRight = false; blnRight = AppClass.CheckButtonRights(SpecialAccessRightName.DefaultDiscount); if (blnRight) { divDefaultDiscount.Attributes.Add("style", "display:inline"); } else { divDefaultDiscount.Attributes.Add("style", "display:none"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserType"] == null || Session["UserName"] == null) { Response.Redirect("~/Login.aspx"); } date = DAL.DALFactory.Instance.DAL_DateAndTime.getDateAndTimeAccordingToZoneTime(Globals.BranchID); hdnAskForBarCode.Value = BAL.BALFactory.Instance.BAL_ChallanIn.AskForBarCodeAndPIN(Globals.BranchID, Globals.UserId, Globals.UserType); if (AppClass.CheckButtonRights(SpecialAccessRightName.RecvFromWSMoveAll) == true) { btnMoveRightAll.Attributes.Add("style", "display:block"); btnMoveLeftAll.Attributes.Add("style", "display:block"); lblMoveAllLbl.Attributes.Add("style", "display:block"); } else { btnMoveRightAll.Attributes.Add("style", "display:none"); btnMoveLeftAll.Attributes.Add("style", "display:none"); lblMoveAllLbl.Attributes.Add("style", "display:none"); } for (int j = 1; j <= 24; j++) { drpPrintStartFrom.Items.Add(j.ToString()); } if (Request.Params["__EVENTTARGET"] as string == "ctl00$ContentPlaceHolder1$btnTemp") { btnTemp_Click(null, EventArgs.Empty); } if (Request.Params["__EVENTTARGET"] as string == "ctl00$ContentPlaceHolder1$drpProcess") { drpProcess_SelectedIndexChanged1(null, EventArgs.Empty); } else if (!IsPostBack) { var isFactory = DAL.DALFactory.Instance.DAL_NewChallan.CheckIsFactory(Globals.BranchID); if (isFactory) { ddlChallanNumber.Visible = true; } else { ddlChallanNumber.Visible = false; } DeafultBind(); CheckSMSDelivery(); } }