Exemplo n.º 1
0
    protected void Update1_Click(object sender, EventArgs e)
    {
        TextBox fileno = (TextBox)DetailsView_service.FindControl("file");
        TextBox infno  = (TextBox)DetailsView_service.FindControl("internal");
        bool    result = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_internalUpdate(infno.Text, fileno.Text);
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "err_msg", "alert('Internal Fileno Updated'); window.location='/secure/Edit_Application_Status.aspx?tc=" + Session["Trackingcode"].ToString() + "';", true);
            // Response.Redirect("~/secure/Edit_Application_Status.aspx?tc=" + Session["Trackingcode"].ToString());
        }
    }
Exemplo n.º 2
0
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name     = (TextBox)DetailsView_service.FindControl("name");
        TextBox         cost     = (TextBox)DetailsView_service.FindControl("Cost");
        CKEditorControl des      = (CKEditorControl)DetailsView_service.FindControl("desc");
        DropDownList    type     = (DropDownList)DetailsView_service.FindControl("type");
        Label           clientid = (Label)DetailsView_service.FindControl("lblclientid");
        bool            result   = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_ServiceTypeUpdate(name.Text, Convert.ToInt32(cost.Text), type.SelectedValue.ToString(), Convert.ToInt32(Session["service_id"].ToString()), des.Text);
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }


        if (result == true)
        {
            Response.Redirect("~/secure/ServiceType/Browse_ServiceType.aspx?clid=" + clientid.Text);
        }
    }
Exemplo n.º 3
0
    protected void DetailsView_service_DataBound(object sender, EventArgs e)
    {
        Label lblclientid  = (Label)DetailsView_service.FindControl("lblclientid");
        Label clientbottom = (Label)DetailsView_service.FindControl("clientbottom");

        clientbottom.Text = ClientAdmin.Utility.GetclientName(Convert.ToInt32(lblclientid.Text));
    }
    protected void dpsubclients_Load(object sender, EventArgs e)
    {
        DropDownList dpsubclients = (DropDownList)DetailsView_service.FindControl("dpsubclients");

        if (!Page.IsPostBack)
        {
            ClientAdmin.Utility.GetSubclients(dpsubclients, Convert.ToInt32(Session["Admin_Customer"].ToString()), false);
        }
        if (Request.QueryString["clid"] != null)
        {
            dpsubclients.Enabled       = false;
            dpsubclients.SelectedValue = Request.QueryString["clid"].ToString();
        }
    }