Ejemplo n.º 1
0
 protected void OnUpdated()
 {
     MsgBoxUpdated("Updated Successfully", true, "");
     ((UpdatePanel)Master.FindControl("DialogBoxPanel")).Update();
     Autofill.SelectCommand = "";
     AsyncForm.Update();
 }
Ejemplo n.º 2
0
    public static void Start(Action action)
    {
        ASynch.RaiseOnModalAsyncStart();

        if (ASynch.IsEnabled)
        {
            var form = new AsyncForm(() =>
            {
                action();
                return(null);
            });
            form.ShowDialog();

            ASynch.RaiseOnModalAsyncEnd();

            if (form._error != null)
            {
                throw new ASyncException(form._error);
            }
        }
        else
        {
            try
            {
                action();
            }
            finally
            {
                ASynch.RaiseOnModalAsyncEnd();
            }
        }
    }
Ejemplo n.º 3
0
 protected void OnUpdated(object sender, FormViewUpdatedEventArgs e)
 {
     MsgBox("Updated Successfully", true, "");
     ((UpdatePanel)Master.FindControl("DialogBoxPanel")).Update();
     Autofill.SelectCommand = "";
     AsyncForm.Update();
 }
Ejemplo n.º 4
0
    protected void ReflectToAward(object sender, EventArgs e)
    {
        TextBox Award = ((TextBox)FormView1.FindControl("Award"));
        string  a     = ((DropDownList)FormView1.FindControl("suggaward")).SelectedItem.Value;

        if (a == "TC" || a == "TN")
        {
            Award.Enabled = true;
        }
        else
        {
            Award.Enabled = false;
        }
        AsyncForm.Update();
    }
Ejemplo n.º 5
0
    protected void SrujaniLoader(object sender, EventArgs e)
    {
        decimal asd = 0;

        foreach (GridViewRow row in GridView1.Rows)
        {
            CheckBox chk = (CheckBox)row.FindControl("ChkSelect");
            if (chk != null & chk.Checked)
            {
                asd = Convert.ToDecimal(row.Cells[4].Text);
            }
        }
        string        SelectCommand = "";
        string        query         = "select emp_dept from suggestions where suggno=" + asd.ToString().Trim();
        SqlConnection con           = new SqlConnection(ConfigurationManager.ConnectionStrings["SrujaniDBConnectionString1"].ConnectionString);

        con.Open();
        SqlCommand    command = new SqlCommand(query, con);
        SqlDataReader reader  = command.ExecuteReader();

        if (reader.HasRows)
        {
            while (reader.Read())
            {
                if (Session["dept_dept_cd"] != null)
                {
                    SelectCommand = "SELECT * FROM [suggestions] WHERE [suggno] = " + asd.ToString().Trim();
                }
                else
                {
                    Response.Redirect("/index.aspx");
                }
            }
        }
        else
        {
            MsgBox("This Srujani does not exist", false, "");
            SelectCommand = "";
        }
        con.Close();
        Autofill.SelectCommand = SelectCommand;
        AsyncForm.Update();
    }
Ejemplo n.º 6
0
    public static T Start <T>(Func <T> action)
    {
        ASynch.RaiseOnModalAsyncStart();

        if (ASynch.IsEnabled)
        {
            var form = new AsyncForm(() => action());
            form.ShowDialog();

            ASynch.RaiseOnModalAsyncEnd();

            if (form._error != null)
            {
                throw new ASyncException(form._error);
            }

            return((T)form._result);
        }
        else
        {
            object res = null;
            try
            {
                res = action();

                ASynch.RaiseOnModalAsyncEnd();
            }
            catch
            {
                ASynch.RaiseOnModalAsyncEnd();

                throw;
            }

            return((T)res);
        }
    }
Ejemplo n.º 7
0
 /// <summary>
 /// Replaces the controls in the form that was generated by the gui designer
 /// </summary>
 /// <param name="form">The form which contains the controls that are to be replaced</param>
 /// <param name="controls">The controls container which contains the controls that are to be replaced</param>
 /// <param name="valueControl">The value control to replace</param>
 public void ReplaceControls(AsyncForm form, Control.ControlCollection controls, Control valueControl)
 {
     Form = form;
     ReplaceControl(controls, valueControl, ValueControl);
 }
Ejemplo n.º 8
0
 public static void Modal(Action action)
 {
     AsyncForm.Start(action);
 }
Ejemplo n.º 9
0
 public static T Modal <T>(Func <T> action)
 {
     return(AsyncForm.Start(action));
 }