how to show message as completed in status field
source code
<%@ Page Language="C#" MasterPageFile="~/MasterPage/Admin.master" AutoEventWireup="true" CodeFile="UpdateTask.aspx.cs" Inherits="AdminModule_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MLM_Logo" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" runat="server" contentplaceholderid="ContentReport">
<form id="form1" runat="server">
<style type="text/css">
.style2
{
width: 822px;
}
.style4
{
width: 351px;
}
</style>
<table width="100%">
<tr>
<td colspan="2" class="style2">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
<table align="left" style="border-color: #1d599e; border-style: outset;
border-width: thin; background-color: #D7D7D7" width="100%">
<tr>
<td align="left" colspan="2" style="margin-left: 80px; background: #1d599e;">
<asp:Label ID="Label7" runat="server" class="style10" Style="color: #FFFFFF;
font-size: 12px; font-weight: 700; text-align: center;" Text="CLIENT INFO"></asp:Label>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<asp:Label ID="Label8" runat="server" Text="Edit the below details"></asp:Label>
</td>
</tr>
<tr>
<td align="left" class="style4" style="margin-left: 120px">
<asp:Label ID="Label51" runat="server" Height="15px"
style="font-weight: 700; font-size: 11px; font-family: Arial, Helvetica, sans-serif"
Text="Project"></asp:Label>
</td>
<td align="left">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" GridLines="None"
onrowcommand="GridView1_RowCommand1" onrowediting="GridView1_RowEditing1"
onrowupdating="GridView1_RowUpdating1" Width="219px">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:TemplateField HeaderText="Module">
<ItemTemplate>
<asp:Label ID="lblmdule" runat="server" Text="<%#bind('Modules') %>"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="ttmle" runat="server" Text="<%#bind('Modules') %>"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Task" >
<ItemTemplate>
<asp:Label ID="lbltask" runat="server" Text="<%#bind('Task') %>"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txttsk" runat="server" Text="<%#bind('Task') %>"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:LinkButton ID="lbledit" runat="server" CommandArgument='<%#bind("Task") %>'
CommandName="Edit" Text="Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Update">
<ItemTemplate>
<asp:LinkButton ID="lblupdt" runat="server"
CommandArgument='<%#bind("Task") %>' CommandName="update" Text="Update"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td>
</td>
</tr>
<tr>
<td align="left" class="style4" colspan="2">
<asp:Label ID="lbgrdvs" runat="server"></asp:Label>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Button" />
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table> </form>
</asp:Content>
code.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class AdminModule_Default : System.Web.UI.Page
{
REMO obj = new REMO();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
clnt();
// details();
MultiView1.Visible = true;
MultiView1.SetActiveView(View1);
}
}
private void clnt()
{
ListItem li = new ListItem();
string qr = "select ProjectTitle from ClientDetails";
DataSet ds = new DataSet();
ds = obj.GETDS(qr);
DropDownList1.DataSource = ds.Tables[0];
DropDownList1.DataValueField = ds.Tables[0].Columns["ProjectTitle"].ToString();
DropDownList1.DataBind();
li.Text = "Choose";
DropDownList1.Items.Insert(0, li);
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
details();
}
private void details()
{
try
{
string qre = "select Modules,Task from ClientDetails where ProjectTitle ='" + DropDownList1.SelectedItem.ToString() + "'";
DataSet ds = new DataSet();
ds = obj.GETDS(qre);
if (ds.Tables[0].Rows.Count != 0)
{
GridView1.DataSource = ds;
GridView1.DataBind();
}
else if (ds.Tables[0].Rows.Count == 0)
{
lbgrdvs.Text = "There is No Module in the List";
}
else
{
lbgrdvs.Text = "There is No Module in the List";
}
}
catch (Exception e)
{
throw e;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void GridView1_RowUpdating1(object sender, GridViewUpdateEventArgs e)
{
GridViewRow grds = GridView1.Rows[e.RowIndex];
TextBox tmle = (TextBox)grds.FindControl("ttmle");
TextBox taskg = (TextBox)grds.FindControl("txttsk");
// Label lb = ((Label)grds.FindControl("lblmdule"));
DropDownList ddl = ((DropDownList)grds.FindControl("DropDownList1"));
string qer = " update ClientDetails set Modules='" + tmle.Text;
qer += "',Task='" + taskg.Text;
qer += "' where ProjectTitle='" + DropDownList1.SelectedItem.ToString();
qer += "'";
obj.Insert(qer);
GridView1.EditIndex = -1;
details();
}
protected void GridView1_RowEditing1(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
details();
}
protected void GridView1_RowCommand1(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
string temp = Convert.ToString(e.CommandArgument);
}
}
}
in this i increase the modules and task .if the modules is completed i need to show the message as status is completed .