private void LoadProductTypeDropDown()
        {
            try
            {
                CommonDL cl = new CommonDL();

                ddlBank.Items.Clear();
                ddlBank.DataSource     = cl.GetBankList().Tables[0];
                ddlBank.DataTextField  = "BankName";
                ddlBank.DataValueField = "BankID";
                ddlBank.DataBind();
                ddlBank.Items.Insert(0, "-- Select One --");
                ddlBank.Items[0].Value = "";

                AgentDL agentOBJ = new AgentDL();
                ddlAgentName.Items.Clear();
                ddlAgentName.DataSource     = agentOBJ.GetAgentList().Tables[0];
                ddlAgentName.DataTextField  = "AgentName";
                ddlAgentName.DataValueField = "AgentID";
                ddlAgentName.DataBind();
                ddlAgentName.Items.Insert(0, "-- Select One --");
                ddlAgentName.Items[0].Value = "";
            }
            catch (Exception exception1)
            {
                ErrorLog.LogErrorMessageToDB("AddEditSupplier.aspx", "", "LoadCityDropDown", exception1.Message.ToString(), new ACEConnection());
                throw;
            }
        }
Exemple #2
0
 internal static DataTable Get_PurchaseType()
 {
     return(CommonDL.Get_PurchaseType());
 }
Exemple #3
0
 internal static DataTable Get_CostCentre()
 {
     return(CommonDL.Get_CostCentre());
 }
Exemple #4
0
 internal static DataTable Get_Vendor()
 {
     return(CommonDL.Get_Vendor());
 }
        /// <summary>
        /// Page_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Page.Form.DefaultButton = btnSubmit.UniqueID;
                Page.Form.DefaultFocus  = txtOldPwd.ClientID;

                if (!IsPostBack)
                {
                    //if (Session["CompanyID"] != null && Session["CompanyID"].ToString() != "")
                    if (SessionControl.CompanyID != 0)
                    {
                        _companyID = Convert.ToInt32(Session["CompanyID"]);
                        _userID    = Convert.ToInt32(Session["UserID"]);
                        UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(_userID, _companyID, CommonDL.GetPageID(), true);
                        if (!_usersXPagesDL.IsAddorEdit)
                        {
                            Response.Redirect("~/Login.aspx", false);
                        }
                    }
                    else
                    {
                        Response.Redirect("~/Login.aspx", false);
                    }


                    txtpwd.Attributes.Add("onblur", "LengthValidation('" + txtpwd.ClientID + "')");
                    txtOldPwd.Attributes.Add("onblur", "LengthValidation('" + txtOldPwd.ClientID + "')");
                }
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("ChangePassword.aspx", "", "Page_Load", ex.Message.ToString(), new ACEConnection());
            }
        }
 /// <summary>
 /// Page_Load
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     _companyID  = Convert.ToInt32(Session["CompanyID"]);
     _userID     = Convert.ToInt32(Session["UserID"]);
     _dateFormat = Convert.ToString(Session["DateFormat"]);
     GridViewProperties.AssignGridViewProperties(gvErrorLog);
     if (_dateFormat == null || _dateFormat == "")
     {
         Response.Redirect("~/Login.aspx", false);
     }
     if (!IsPostBack)
     {
         if (Session["CompanyID"] != null && Session["CompanyID"].ToString() != "")
         {
             UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(_userID, _companyID, CommonDL.GetPageID(), true);
             if (!_usersXPagesDL.IsAddorEdit)
             {
                 Response.Redirect("~/Login.aspx", false);
             }
             LoadErrorLogList();
         }
         //else
         //{
         //  Response.Redirect("~/Login.aspx", false);
         //}
     }
 }
Exemple #7
0
 internal static DataTable Get_AllBlock()
 {
     return(CommonDL.Get_AllBlock());
 }
Exemple #8
0
 internal static int Get_SubLedgerType(string arg_sType)
 {
     return(CommonDL.Get_SubLedgerType(arg_sType));
 }
Exemple #9
0
 internal static DataTable Get_AllLead()
 {
     return(CommonDL.Get_AllLead());
 }
Exemple #10
0
 internal static DataTable Get_AllFlat_Unsold()
 {
     return(CommonDL.Get_AllFlat_Unsold());
 }
Exemple #11
0
 internal static int Get_BuyerType()
 {
     return(CommonDL.Get_BuyerType());
 }
Exemple #12
0
 internal static DataTable Get_Income()
 {
     return(CommonDL.Get_Income());
 }
Exemple #13
0
 internal static int Get_Buyer_SL(int arg_iBuyerId)
 {
     return(CommonDL.Get_Buyer_SL(arg_iBuyerId));
 }
Exemple #14
0
 internal static int Get_VendorType()
 {
     return(CommonDL.Get_VendorType());
 }
Exemple #15
0
 internal static DataTable Get_AllPaySchType()
 {
     return(CommonDL.Get_AllPaySchType());
 }
Exemple #16
0
 internal static string Get_CompanyDB(int arg_iCompanyId, DateTime arg_dPVDate)
 {
     return(CommonDL.Get_CompanyDB(arg_iCompanyId, arg_dPVDate));
 }
        /// <summary>
        /// Page_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //_companyID = Convert.ToInt32(Session["CompanyID"]);
                //_userID = Convert.ToInt32(Session["UserID"]);

                _companyID = SessionControl.CompanyID.cxToInt32();
                _userID    = SessionControl.UserID.cxToInt32();

                ViewState["PageID"] = CommonDL.GetPageID();
                if (!IsPostBack)
                {
                    //if (Session["CompanyID"] != null && Session["CompanyID"].ToString() != "")
                    if (SessionControl.CompanyID != 0)
                    {
                        UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(_userID, _companyID, CommonDL.GetPageID(), true);
                        if (!_usersXPagesDL.IsAddorEdit)
                        {
                            //Response.Redirect("~/Login.aspx", false);
                            gvUserDetails.Columns[10].Visible = false;
                        }
                    }
                    else
                    {
                        Response.Redirect("~/Login.aspx", false);
                    }
                    // Set ViewState Variables
                    ViewState["SortDirection"]  = "ASC";
                    ViewState["SortExpression"] = "UserName";

                    // Assign Common GridView Properties to all GridViews used in the page
                    GridViewProperties.AssignGridViewProperties(gvUserDetails);
                    GridViewProperties.AssignGridViewProperties(gvUserCompanies);


                    // Get the UserID QueryString Value [if QueryString exists]
                    if (Request.QueryString["UserID"] != null && Request.QueryString["UserID"] != "null")
                    {
                        // Get the details of the User with the UserID QueryString Value
                        GetUserDetails(Convert.ToInt32(Request.QueryString["UserID"].ToString()), true);

                        trUserDetailView.Visible        = true;
                        trUserDetailTabs.Visible        = true;
                        trUpdateCancelButtonRow.Visible = true;
                        trSearchAndAddRow.Visible       = false;
                        trGridRow.Visible = false;
                        tblUser.Visible   = false;
                    }
                    else
                    {
                        // Get the list of users
                        GetUserDetails(Convert.ToString(txtSearchID.Text.ToString()), Convert.ToBoolean(rblReportOption.SelectedValue));
                        // Show only the list of users and hide an individual user detail view
                        trUserDetailView.Visible        = false;
                        trUserDetailTabs.Visible        = false;
                        trUpdateCancelButtonRow.Visible = false;
                        trSearchAndAddRow.Visible       = true;
                        trGridRow.Visible = true;
                        tblUser.Visible   = true;
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("ViewUser.aspx", "", "Page_Load", ex.Message.ToString(), new ACEConnection());
            }
        }
Exemple #18
0
 internal static int Get_ResourceSubLedger(int arg_iResId, ref int arg_iResTypeId)
 {
     return(CommonDL.Get_ResourceSubLedger(arg_iResId, ref arg_iResTypeId));
 }
Exemple #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int companyID = 0;
                int userID    = 0;
                //if (Session["CompanyID"] != null && Session["CompanyID"].ToString() != "")
                if (SessionControl.CompanyID != 0)
                {
                    //companyID = Convert.ToInt32(Session["CompanyID"]);
                    //userID = Convert.ToInt32(Session["UserID"]);

                    companyID = SessionControl.CompanyID.cxToInt32();
                    userID    = SessionControl.UserID.cxToInt32();

                    UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(userID, companyID, CommonDL.GetPageID(), true);
                    if (_usersXPagesDL.IsAddorEdit)
                    {
                    }
                    else
                    {
                        Response.Redirect("~/Login.aspx", false);
                    }
                }
                else
                {
                    Response.Redirect("~/Login.aspx", false);
                }
                GridViewProperties.AssignGridViewProperties(gvRoleSettings);
                LoadDropDownList();
                gvRoleSettings.AllowPaging = false;
                btnSave.Visible            = false;
                btnCancel.Visible          = false;
            }
        }
Exemple #20
0
        /// <summary>
        /// Page_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    int UserID = 0;
                    //UserID = Convert.ToInt32(Session["UserID"]);
                    UserID         = SessionControl.UserID.cxToInt32();
                    hfUserID.Value = UserID.ToString();
                    LoadDateFormatDropDown();
                    GetUserSettings(Convert.ToInt32(hfUserID.Value), true);

                    //_companyID = Convert.ToInt32(Session["CompanyID"]);
                    //_userID = Convert.ToInt32(Session["UserID"]);

                    _companyID = SessionControl.CompanyID.cxToInt32();
                    _userID    = SessionControl.UserID.cxToInt32();

                    UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(_userID, _companyID, CommonDL.GetPageID(), true);
                    if (!_usersXPagesDL.IsAddorEdit)
                    {
                        Response.Redirect("~/Login.aspx", false);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("Settings.aspx", "", "Page_Load", ex.Message, new ACEConnection());
            }
        }
Exemple #21
0
        /// <summary>
        /// Page_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //Commentedd on 17/04/2014
                //_companyID = Convert.ToInt32(Session["CompanyID"]);
                //_userID = Convert.ToInt32(Session["UserID"]);
                //_dateFormat = Convert.ToString(Session["DateFormat"]);

                _companyID  = SessionControl.CompanyID.cxToInt32();
                _userID     = SessionControl.UserID.cxToInt32();
                _dateFormat = SessionControl.DateFormat.ToString();

                if (_dateFormat == null || _dateFormat == "")
                {
                    Response.Redirect("~/Login.aspx", false);
                }

                ceDOB.Format = _dateFormat;
                ceDOJ.Format = _dateFormat;
                if (!IsPostBack)
                {
                    //commented on 17/04/2014
                    //if (Session["CompanyID"] != null && Session["CompanyID"].ToString() != "")
                    if (_companyID != 0)
                    {
                        UsersXPagesDL _usersXPagesDL = new UsersXPagesDL(_userID, _companyID, CommonDL.GetPageID(), true);
                        if (!_usersXPagesDL.IsAddorEdit)
                        {
                            Response.Redirect("~/Login.aspx", false);
                        }
                    }
                    else
                    {
                        Response.Redirect("~/Login.aspx", false);
                    }


                    // Set ViewState Variables
                    ViewState["SortDirection"]  = "ASC";
                    ViewState["SortExpression"] = "EmployeeCode";

                    // Page.Form.DefaultButton = btnSearch.UniqueID;
                    Page.Form.DefaultFocus = txtSearchID.UniqueID;

                    // Assign Common GridView Properties to all GridViews used in the page
                    GridViewProperties.AssignGridViewProperties(gvEmployeeDetails);
                    LoadDropDownList();
                    GetEmployeeDetails("", Convert.ToBoolean(rblReportOption.SelectedValue));
                }
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("ManageEmployee.aspx", "", "Page_Load", ex.Message.ToString(), new ACEConnection());
            }
        }