Exemple #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int       s         = Convert.ToInt32(Request.QueryString["id"]);
            SourecDal sourerepo = new SourecDal();

            sourerepo.Edit(s, TextBox1.Text);
            Response.Redirect("SourceHome.aspx");
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            s = Convert.ToInt32(Request.QueryString["id"]);
            SourecDal repo = new SourecDal();

            repo.TempDecline(s);

            Response.Redirect("~/Approval/ApprovalForm.aspx");
        }
Exemple #3
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            SourecDal sourcerepo = new SourecDal();

            sourcerepo.Entersource(TextBox1.Text + "\n");



            Response.Redirect("SourceHome.aspx");
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int           s         = Convert.ToInt32(Request.QueryString["id"]);
            SourecDal     sourerepo = new SourecDal();
            List <Source> l         = sourerepo.GetSources();

            foreach (Source sou in l)
            {
                if (sou.Id == s)
                {
                    TextBox1.Text = sou.Name;
                }
            }
        }
Exemple #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int s = Convert.ToInt32(Request.QueryString["id"]);

            SourecDal sourerepo = new SourecDal();

            //Label1.Text = sourerepo.Sourceslist[s].Name;
            sourerepo.Delete(s);


            //Label1.Text = sourerepo.Sourceslist[s].Name;


            Response.Redirect("SourceHome.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int                   s    = Convert.ToInt32(Request.QueryString["id"]);
            SourecDal             repo = new SourecDal();
            List <TemplateAccess> l    = repo.GetTemplates();

            ////Source so = new Source();
            ///
            foreach (TemplateAccess template in l)
            {
                if (template.Id == s)
                {
                    Label1.Text = template.TemplateName;
                }
            }
        }
Exemple #7
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            SourecDal sourcerepo = new SourecDal();



            string text1 = TextBox1.Text;

            if (text1 == null || text1 == string.Empty)
            {
                Label1.Visible = true;

                Label1.Text = " Please Enter name";
            }
            else
            {
                sourcerepo.Entersource(TextBox1.Text + "\n");

                Response.Redirect("~/Source/SourceHome.aspx");
            }
        }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int           s         = Convert.ToInt32(Request.QueryString["id"]);
            SourecDal     sourerepo = new SourecDal();
            List <Source> l         = sourerepo.GetSources();

            ////Source so = new Source();
            foreach (Source sou in l)
            {
                if (sou.Id == s)
                {
                    Label1.Text = sou.Name;
                }
            }



            //PlaceHolder placeHolder = new PlaceHolder();
            //Label label = new Label();
            //label.Text = "Are you Sure You Want To delete " + sourerepo.Sourceslist[s].Name;
            //placeHolder.Controls.Add(label);
        }
Exemple #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Table table = new Table();

            table.ID = "1";
            PlaceHolder1.Controls.Add(table);

            SourecDal sourecDal = new SourecDal();

            sourecDal.GetSources();

            for (int count = 0; count < sourecDal.Sourceslist.Count; count++)
            {
                TableRow tableRow = new TableRow();
                table.Rows.Add(tableRow);
                TableCell cell = new TableCell();
                tableRow.Cells.Add(cell);
                Label label = new Label();
                PlaceHolder1.Controls.Add(label);
                label.Text  = sourecDal.Sourceslist[count].Name;
                label.Width = 200;

                HyperLink Edit = new HyperLink();
                PlaceHolder1.Controls.Add(Edit);
                Edit.Text        = "EDIT";
                Edit.NavigateUrl = ("~/Source/EditSource.aspx?id=" + Convert.ToString(sourecDal.Sourceslist[count].Id));
                Edit.Width       = 150;
                HyperLink Delete = new HyperLink();
                PlaceHolder1.Controls.Add(Delete);
                Delete.Text        = "DELETE" + "<br/>" + "<br/>";
                Delete.NavigateUrl = ("~/Source/DeleteSource.aspx?id=" + Convert.ToString(sourecDal.Sourceslist[count].Id));


                //Delete.Width = 600;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Table table1 = new Table();
                Table table2 = new Table();
                table1.ID = "1";
                PlaceHolder2.Controls.Add(table1);

                SourecDal repo1 = new SourecDal();
                repo1.GetApproved();
                //HyperLink1.NavigateUrl = ("~/ApprovedTemplates.aspx");
                //HyperLink2.NavigateUrl = ("~/DeclinedForm.aspx");

                for (int count = 0; count < repo1.templateslist.Count; count++)
                {
                    TableRow tableRow = new TableRow();
                    table1.Rows.Add(tableRow);
                    TableCell tableCell = new TableCell();
                    tableRow.Cells.Add(tableCell);
                    Label label = new Label();
                    label.Text  = "TEMPLATE--";
                    label.Width = 200;
                    PlaceHolder2.Controls.Add(label);

                    Label label1 = new Label();
                    label1.Text  = repo1.templateslist[count].TemplateName;
                    label1.Width = 150;
                    PlaceHolder2.Controls.Add(label1);

                    Label label2 = new Label();
                    label2.Text  = repo1.templateslist[count].OperationManager;
                    label2.Width = 250;
                    PlaceHolder2.Controls.Add(label2);

                    Label label3 = new Label();
                    label3.Text  = "Accepted";
                    label3.Width = 400;
                    PlaceHolder2.Controls.Add(label3);
                }



                table2.ID = "1";
                PlaceHolder3.Controls.Add(table2);

                //SourecDal repo = new SourecDal();
                repo1.GetDeclined();
                //HyperLink1.NavigateUrl = ("~/ApprovedTemplates.aspx");
                //HyperLink2.NavigateUrl = ("~/DeclinedForm.aspx");

                for (int count = 0; count < repo1.templateslist.Count; count++)
                {
                    TableRow tableRow = new TableRow();
                    table2.Rows.Add(tableRow);
                    TableCell tableCell = new TableCell();
                    tableRow.Cells.Add(tableCell);
                    Label label = new Label();
                    label.Text  = "TEMPLATE--";
                    label.Width = 200;
                    PlaceHolder3.Controls.Add(label);

                    Label label1 = new Label();
                    label1.Text  = repo1.templateslist[count].TemplateName;
                    label1.Width = 150;
                    PlaceHolder3.Controls.Add(label1);

                    Label label2 = new Label();
                    label2.Text  = repo1.templateslist[count].OperationManager;
                    label2.Width = 250;
                    PlaceHolder3.Controls.Add(label2);

                    Label label3 = new Label();
                    label3.Text  = "Declined";
                    label3.Width = 400;
                    PlaceHolder3.Controls.Add(label3);
                }
            }

            Table table3 = new Table();

            table3.ID = "1";
            PlaceHolder1.Controls.Add(table3);

            /*   SourecDal repo = new SourecDal()*/;
            SourecDal repo = new SourecDal();

            repo.GetTemplates();
            //HyperLink1.NavigateUrl = ("~/ApprovedTemplates.aspx");
            //HyperLink2.NavigateUrl = ("~/DeclinedForm.aspx");

            for (int count = 0; count < repo.templateslist.Count; count++)
            {
                TableRow tableRow = new TableRow();
                table3.Rows.Add(tableRow);
                TableCell tableCell = new TableCell();
                tableRow.Cells.Add(tableCell);
                Label label = new Label();
                label.Text  = " NEW_TEMPLATE--";
                label.Width = 200;
                PlaceHolder1.Controls.Add(label);

                Label label1 = new Label();
                label1.Text  = repo.templateslist[count].TemplateName;
                label1.Width = 150;
                PlaceHolder1.Controls.Add(label1);

                Label label2 = new Label();
                label2.Text  = repo.templateslist[count].OperationManager;
                label2.Width = 250;
                PlaceHolder1.Controls.Add(label2);

                HyperLink hyper = new HyperLink();
                hyper.Text        = "Approve";
                hyper.Width       = 100;
                hyper.NavigateUrl = ("~/AcceptTemplate.aspx?id=" + Convert.ToString(repo.templateslist[count].Id));
                PlaceHolder1.Controls.Add(hyper);

                HyperLink hyper1 = new HyperLink();
                hyper1.Text        = "Decline";
                hyper1.Width       = 400;
                hyper1.NavigateUrl = ("~/DeclineTemplate.aspx?id=" + Convert.ToString(repo.templateslist[count].Id));
                PlaceHolder1.Controls.Add(hyper1);
            }
        }