Exemplo n.º 1
0
        protected void btnissreject_ServerClick(object sender, EventArgs e)
        {
            Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
            findata.Open();
            UserData user = (UserData)Session["User"];

            int result = findata.deleteissflag(id);

            if (result == 1)
            {
                changePagerejected();
            }

            findata.Close();
        }
Exemplo n.º 2
0
        protected void btnissueadd_ServerClick(object sender, EventArgs e)
        {
            Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
            findata.Open();
            UserData user = (UserData)Session["User"];



            if (txtisstitle.Value.Equals("") || txtissdesc.Value.Equals("") || LevelDrop.Items[LevelDrop.SelectedIndex].Text.Equals("Choose Level"))
            {
                Invlaidproject.InnerHtml = "*Please make sure you have filled in all the fields<br/>";
                return;
            }
            else if (UserChoose.Items[UserChoose.SelectedIndex].Text.Equals("Choose Member"))
            {
                Invlaidproject.InnerHtml = "*You have at least invite one member to issue<br/>";
            }
            else
            {
                int result = findata.createissue(txtisstitle.Value, txtissdesc.Value, projid.ToString(), LevelDrop.Items[LevelDrop.SelectedIndex].Text, user.getID(), DateTime.Now);
                if (result != 0)
                {
                    foreach (ListItem item in UserChoose.Items)
                    {
                        if (item.Selected)
                        {
                            int id = Convert.ToInt32(item.Value.ToString());
                            findata.insertissuenotifications(result.ToString(), id.ToString(), DateTime.Now);
                        }
                    }
                    findata.deleteissflag(id);
                }
            }



            findata.Close();
            changePage();
        }