예제 #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                db            = new dal();
                dt            = new DataTable();
                cc            = new ClientClass();
                cc.Screen     = txtScreen.Text;
                cc.ProjectIdx = ddlProject.SelectedValue;

                if (chkActive.Checked == true)
                {
                    cc.Active = "1";
                }
                else
                {
                    cc.Active = "0";
                }

                cc.insertScreen(dt, Convert.ToInt32(cc.Active), Convert.ToInt32(cc.ProjectIdx), cc.Screen, txtUrl.Text, ddlParent.SelectedValue == "-1" ? 0 : Convert.ToInt32(ddlParent.SelectedValue), Convert.ToInt32(ddlIsParent.SelectedValue), txtIcon.Text, Convert.ToDecimal(txtSorting.Text));

                string message = " Add Successfully.";
                string script  = "window.onload = function(){ alert('";
                script += message;
                script += "')};";
                ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);
                refreshText();
                fillgrid();
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message.ToString();
            }
        }
예제 #2
0
 private void DropDownParent()
 {
     dt = new DataTable();
     cc = new ClientClass();
     cc.getScreenParent(dt);
     ddlParent.DataTextField  = "SCREEN_DESC";
     ddlParent.DataValueField = "IDX";
     ddlParent.DataSource     = dt;
     ddlParent.DataBind();
     ddlParent.Items.Insert(0, new ListItem("Select..", "-1"));
 }
예제 #3
0
 private void dropdown()
 {
     dt = new DataTable();
     cc = new ClientClass();
     cc.getUserId(dt);
     ddlUser.DataTextField  = "USERNAME";
     ddlUser.DataValueField = "USERID";
     ddlUser.DataSource     = dt;
     ddlUser.DataBind();
     ddlUser.Items.Insert(0, new ListItem("Select..", "-1"));
 }
예제 #4
0
 private void DropDownProject()
 {
     dt = new DataTable();
     cc = new ClientClass();
     //cc.insertBlankIndex(dt);
     cc.getProject(dt);
     ddlProject.DataTextField  = "PROJECT_DESC";
     ddlProject.DataValueField = "projectIdx";
     ddlProject.DataSource     = dt;
     ddlProject.DataBind();
     ddlProject.Items.Insert(0, new ListItem("Select..", "-1"));
 }
예제 #5
0
        private void dropdownProject()
        {
            dt = new DataTable();
            cc = new ClientClass();
            cc.getProjectDrop(dt);
            ddlProject.DataTextField  = "PROJECT_DESC";
            ddlProject.DataValueField = "IDX";

            ddlProject.DataSource = dt;
            ddlProject.DataBind();
            ddlProject.Items.Insert(0, new ListItem("Select..", "-1"));
        }
예제 #6
0
 public void fillgrid()
 {
     try
     {
         db = new dal();
         ds = new DataSet();
         cc = new ClientClass();
         cc.getScreen(ds);
         gvScreen.DataSource = ds;
         gvScreen.DataBind();
     }
     catch (Exception ex)
     {
         ex.Message.ToString();
     }
 }
예제 #7
0
 public void fillgridProjectMappingAll()
 {
     try
     {
         db = new dal();
         ds = new DataSet();
         cc = new ClientClass();
         cc.getProjectMappingAll(ds);
         gvProject.DataSource = ds;
         gvProject.DataBind();
     }
     catch (Exception ex)
     {
         ex.Message.ToString();
     }
 }
예제 #8
0
 public void fillgrid()
 {
     try
     {
         string projName = ddlProject.SelectedItem.ToString();
         db = new dal();
         dt = new DataTable();
         cc = new ClientClass();
         cc.getProjects(dt, projName);
         gvProject.DataSource = dt;
         gvProject.DataBind();
     }
     catch (Exception ex)
     {
         ex.Message.ToString();
     }
 }
예제 #9
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                db             = new dal();
                dt             = new DataTable();
                cc             = new ClientClass();
                cc.ProjectDesc = txtProject.Text;
                if (chkActive.Checked == true)
                {
                    cc.Active = "1";
                }
                else
                {
                    cc.Active = "0";
                }

                if (cc.ProjectAlreadyExists() == true)
                {
                    string message1 = "alert('Project Already Exist.')";
                    ScriptManager.RegisterClientScriptBlock((sender as Control), this.GetType(), "alert", message1, true);
                    refreshText();
                }
                else
                {
                    cc.insertProjectDesc();
                    string message = " Add Successfully.";
                    string script  = "window.onload = function(){ alert('";
                    script += message;
                    script += "')};";
                    ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);

                    // lblMsg.Text = "Add Successfully";
                    refreshText();
                    fillgrid();
                }
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message.ToString();
            }
        }
예제 #10
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                db             = new dal();
                dt             = new DataTable();
                cc             = new ClientClass();
                cc.MappingType = ddlMapping.SelectedItem.ToString();
                cc.userId      = ddlUser.Text;
                cc.ProjectIdx  = ddlProject.SelectedValue;
                if (chkActive.Checked == true)
                {
                    cc.MappingActive = "1";
                }
                else
                {
                    cc.MappingActive = "0";
                }

                //if (cc.MappingAlreadyExists() == true)
                //{
                //    string message1 = "alert('Record Already Exist.')";
                //    ScriptManager.RegisterClientScriptBlock((sender as Control), this.GetType(), "alert", message1, true);
                //    refreshText();
                //    fillgrid();
                //}
                //else
                //{
                cc.insertProjectMapping();
                string message = "alert('Add Successfully.')";
                ScriptManager.RegisterClientScriptBlock((sender as Control), this.GetType(), "alert", message, true);
                refreshText();
                fillgrid();
                fillgridProjectMappingAll();
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message.ToString();
            }
        }