public User_Create(int User_id, int APPLICATION_TYPE_ID, string Username)
 {
     InitializeComponent();
     userid = User_id;
     Application_Type_Id = APPLICATION_TYPE_ID;
     dbc.BindCompany(ddl_Company);
     dbc.BindBranch(ddl_branchname, int.Parse(ddl_Company.SelectedValue.ToString()));
     dbc.Bindrole(ddl_role);
     dbc.Bind_Employee_Job_Role(ddl_Emp_Job_Role);
     User_Name = Username;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        else
        {
            userid  = int.Parse(Session["userid"].ToString());
            Empname = Session["Empname"].ToString();
        }

        if (!IsPostBack)
        {
            dbc.BindCompany(ddl_Company);
            dbc.BindBranch(ddl_branchname, int.Parse(ddl_Company.SelectedValue.ToString()));
            // GetMaximumClientNumber();
            DivView.Visible   = true;
            Divcreate.Visible = false;
            lblhead.Text      = "View Clients";
            GridviewbindClients();
            lbl_Record_Addedby.Text   = Empname.ToString();
            lbl_Record_AddedDate.Text = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt");
            dbc.BindCountry(Ddl_Client_Country);
            dbc.BindCompany(ddl_Company);

            //  dbc.BindState(ddl_company_state);
            if (Ddl_Client_Country.SelectedIndex > 0)
            {
                dbc.BindState1(Ddl_Client_State, int.Parse(Ddl_Client_Country.SelectedValue));
            }
            if (Ddl_Client_State.SelectedIndex > 0)
            {
                dbc.BindDistrict(ddl_Client_district, int.Parse(Ddl_Client_State.SelectedValue.ToString()));
            }
        }
    }
        private void Create_Branch_Load(object sender, EventArgs e)
        {
            Branch_id = 0;
            dbc.BindCompany(ddl_Company);
            pnlSideTree.Visible = true;
            AddParent();
            lbl_RecordAddedBy.Text = username;
            lbl_RecordAddedOn.Text = DateTime.Now.ToString();
            //  ddl_Company.SelectedIndex = 0;
            ddl_Company.Select();

            dbc.BindState1(ddl_Branch_state, int.Parse(ddl_Branch_country.SelectedValue.ToString()));

            bindDistrict();
        }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        else
        {
            userid  = int.Parse(Session["userid"].ToString());
            Empname = Session["Empname"].ToString();
        }

        //txt_password1.Text = "";
        //txt_confirmpassword.Text = "";
        txt_password1.Attributes.Add("value", txt_password1.Text);
        txt_confirmpassword.Attributes.Add("value", txt_confirmpassword.Text);
        if (!IsPostBack)
        {
            dbc.BindCompany(ddl_Company);
            dbc.BindBranch(ddl_branchname, int.Parse(ddl_Company.SelectedValue.ToString()));
            DivNewsView.Visible  = true;
            DivNewcreate.Visible = false;
            dbc.Bindrole(ddl_role);
            grd_Master.Visible       = true;
            grd_UpdateMaster.Visible = false;

            trpassword.Visible       = true;
            trconpassword.Visible    = true;
            grd_UpdateMaster.Visible = false;
            grd_Master.Visible       = true;
            GridviewbindMaster();
            Get_Userdetails();
            UserRoleShow();
            //Cache.Remove(key);
            // Session["imgempphoto"] = null;
        }
        lbl_Record_Addedby.Text   = Empname.ToString();
        lbl_Record_AddedDate.Text = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        else
        {
            userid  = int.Parse(Session["userid"].ToString());
            Empname = Session["Empname"].ToString();
        }
        if (!IsPostBack)
        {
            Divcreate.Visible = false;
            DivView.Visible   = true;
            lblhead.Text      = "View Branch";

            lbl_RecordAddedOn0.Text = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt");
            lbl_RecordAddedBy0.Text = Empname;

            dbc.BindCountry(ddl_Branch_country);
            dbc.BindCompany(ddl_Company);
            LoadGrid();
            //  dbc.BindState(ddl_company_state);
            if (ddl_Branch_country.SelectedIndex > 0)
            {
                dbc.BindState1(ddl_Branch_state, int.Parse(ddl_Branch_country.SelectedValue));
            }
            if (ddl_Branch_state.SelectedIndex > 0)
            {
                dbc.BindDistrict(ddl_Branch_district, int.Parse(ddl_Branch_state.SelectedValue.ToString()));
            }


            lbl_branch_id.Text = "";
        }
    }
        private void Vendor_Create_Load(object sender, EventArgs e)
        {
            AutoGenerateNumber();
            dbc.BindCompany(ddl_CompanyName);
            dbc.BindBranch(ddl_BranchNamee, int.Parse(ddl_CompanyName.SelectedValue.ToString()));
            txt_Vendor.Select();

            if (Vendor_Id == 0)
            {
                btn_Add_New.Text = "Add New Vendor";
                tabControl1.TabPages.Remove(grid_State_County);
            }
            else
            {
                Bind_Vendor_Info();
                Bind_All_State_Info();
                btn_Add_New.Text = "Edit Vendor";
            }


            Ordermanagement_01.Vendors.Vendor_View vendorview = new Ordermanagement_01.Vendors.Vendor_View(Userid, User_Role);

            vendorview.Hide();
        }