本文整理汇总了C#中UserLogin_mst类的典型用法代码示例。如果您正苦于以下问题:C# UserLogin_mst类的具体用法?C# UserLogin_mst怎么用?C# UserLogin_mst使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserLogin_mst类属于命名空间,在下文中一共展示了UserLogin_mst类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Showvalues
protected void Showvalues()
{
int incidentid = Convert.ToInt32(Session["incidentid"]);
ObjIncident = ObjIncident.Get_By_id(incidentid);
ObjIncidentStates = ObjIncidentStates.Get_By_id(incidentid);
// drpTechnician.SelectedValue = ObjIncidentStates.Technicianid.ToString();
drpCategory.SelectedValue = ObjIncidentStates.Categoryid.ToString();
BindDropSubCategory();
drpSubcategory.SelectedValue = ObjIncidentStates.Subcategoryid.ToString();
// drpPriority.SelectedValue = ObjIncidentStates.Priorityid.ToString();
txtTitle.Text = ObjIncident.Title.ToString();
if (ObjIncident.Description != null)
{ txtDescription.Text = ObjIncident.Description.ToString(); }
UserLogin_mst objUsr = new UserLogin_mst();
ContactInfo_mst objInfo = new ContactInfo_mst();
objInfo = objInfo.Get_By_id(ObjIncident.Requesterid);
objUsr = objUsr.Get_By_id(ObjIncident.Requesterid);
txtUsername.Text = objUsr.Username;
txtEmail.Text = objInfo.Emailid;
ViewState["UserCreate"] = "Exist";
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:24,代码来源:CreateChangefromIncident.aspx.cs
示例2: btnAdd_Click
protected void btnAdd_Click(object sender, EventArgs e)
{
bool FlagUserStatus = true;
#region Find Userid of User who is Requesting to log a call
#region If User Already Exist
if (ViewState["UserCreate"].ToString() == "Exist")
{
objOrganization = objOrganization.Get_Organization();
ObjUserLogin = ObjUserLogin.Get_UserLogin_By_UserName(txtUsername.Text.ToString().Trim(), objOrganization.Orgid);
if (ObjUserLogin.Userid != 0)
{
requesterid = ObjUserLogin.Userid;
}
}
#endregion
#region If New User is to be Created
else if (ViewState["UserCreate"].ToString() == "create")
{
string varEmail = "";
string varRoleName = Resources.MessageResource.BasicUserRole.ToString();
if (txtEmail.Text == "")
{
varEmail = Resources.MessageResource.errMemshipCreateUserEmail.ToString();
}
else
{
varEmail = txtEmail.Text;
}
int roleid = objRole.Get_By_RoleName(varRoleName);
int status;
objOrganization = objOrganization.Get_Organization();
objuser.Username = txtUsername.Text.ToString();
objuser.Password = Resources.MessageResource.strDefaultPassword.ToString();
objuser.Roleid = roleid;
objuser.Orgid = objOrganization.Orgid;
objuser.ADEnable = false;
objuser.Enable = true;
objuser.Createdatetime = DateTime.Now.ToString();
status = objuser.Insert();
if (status == 1)
{
// Create Mstatus field to send in Membership.CreateUser function as Out Variable for creating Membership User database
MembershipCreateStatus Mstatus = default(MembershipCreateStatus);
// Call Membership.CreateUser function to create Membership user
Membership.CreateUser(txtUsername.Text.ToString().Trim(), Resources.MessageResource.strDefaultPassword.ToString(), varEmail, "Project Name", "Helpdesk", true, out Mstatus);
// Call Roles.AddUserToRole Function to Add User To Role
Roles.AddUserToRole(txtUsername.Text.ToString().Trim(), varRoleName);
// Declare Local Variable Userid to fetch userid of newly created user
// Create Object objUserLogin of UserLogin_mst()Class
objuser = new UserLogin_mst();
// Fetch userid of Newly created user and assign to local variable userid by calling function objUserLogin.Get_By_UserName
requesterid = objuser.Get_By_UserName(txtUsername.Text.ToString().Trim(), objOrganization.Orgid);
// If userid not equal to 0 then we get userid of Newly created user otherwise error Occured
ContactInfo_mst objContactInfo = new ContactInfo_mst();
objContactInfo.Userid = requesterid;
objContactInfo.Emailid = varEmail;
objContactInfo.Firstname = txtUsername.Text.ToString();
objContactInfo.Lastname = txtUsername.Text.ToString();
objContactInfo.Insert();
}
}
#endregion
#region If User is Not to be Created
else if (ViewState["UserCreate"].ToString() == "notcreate")
{
FlagUserStatus = false;
}
#endregion
#endregion
MembershipUser User = Membership.GetUser();
string userName;
userName = User.UserName.ToString();
if (FlagUserStatus == true)
{
objOrganization = objOrganization.Get_Organization();
objuser = objuser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
ObjProblem.CreatedByid = objuser.Userid;
ObjProblem.Requesterid = requesterid;
ObjProblem.Categoryid = Convert.ToInt16(drpCategory.SelectedValue);
ObjProblem.Subcategoryid = Convert.ToInt16(drpSubcategory.SelectedValue);
ObjProblem.Priorityid = Convert.ToInt16(drpPriority.SelectedValue);
ObjProblem.Statusid = Convert.ToInt16(drpStatus.SelectedValue);
ObjProblem.Technicianid = Convert.ToInt16(drpTechnician.SelectedValue);
ObjProblem.title = txtTitle.Text;
ObjProblem.Description = txtDescription.Text;
if (Convert.ToInt16(drpTechnician.SelectedValue) != 0)
{
ObjProblem.AssginedTime = DateTime.Now.ToString();
}
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:101,代码来源:IncidentToProblem.aspx.cs
示例3: buttonadd_click
protected void buttonadd_click(object sender, EventArgs e)
{
/////Add Exception handilng try catch change by vishal 21-05-2012
try
{
#region Find Userid of User who is Requesting to log a call
#region If User Already Exist
if (ViewState["UserCreate"].ToString() == "Exist")
{
objOrganization = objOrganization.Get_Organization();
ObjUserLogin = ObjUserLogin.Get_UserLogin_By_UserName(txtUsername.Text.ToString().Trim(), objOrganization.Orgid);
if (ObjUserLogin.Userid != 0)
{
requesterid = ObjUserLogin.Userid;
}
}
#endregion
#region If New User is to be Created
else if (ViewState["UserCreate"].ToString() == "create")
{
string varEmail = "";
string varRoleName = Resources.MessageResource.BasicUserRole.ToString();
if (txtEmail.Text == "")
{
varEmail = Resources.MessageResource.errMemshipCreateUserEmail.ToString();
}
else
{
varEmail = txtEmail.Text;
}
int roleid = objRole.Get_By_RoleName(varRoleName);
int status;
objOrganization = objOrganization.Get_Organization();
objuser.Username = txtUsername.Text.ToString();
objuser.Password = Resources.MessageResource.strDefaultPassword.ToString();
objuser.Roleid = roleid;
objuser.Orgid = objOrganization.Orgid;
objuser.ADEnable = false;
objuser.Enable = true;
objuser.Createdatetime = DateTime.Now.ToString();
status = objuser.Insert();
if (status == 1)
{
// Create Mstatus field to send in Membership.CreateUser function as Out Variable for creating Membership User database
MembershipCreateStatus Mstatus = default(MembershipCreateStatus);
// Call Membership.CreateUser function to create Membership user
Membership.CreateUser(txtUsername.Text.ToString().Trim(), Resources.MessageResource.strDefaultPassword.ToString(), varEmail, "Project Name", "Helpdesk", true, out Mstatus);
// Call Roles.AddUserToRole Function to Add User To Role
Roles.AddUserToRole(txtUsername.Text.ToString().Trim(), varRoleName);
// Declare Local Variable Userid to fetch userid of newly created user
// Create Object objUserLogin of UserLogin_mst()Class
objuser = new UserLogin_mst();
// Fetch userid of Newly created user and assign to local variable userid by calling function objUserLogin.Get_By_UserName
requesterid = objuser.Get_By_UserName(txtUsername.Text.ToString().Trim(), objOrganization.Orgid);
// If userid not equal to 0 then we get userid of Newly created user otherwise error Occured
ContactInfo_mst objContactInfo = new ContactInfo_mst();
objContactInfo.Userid = requesterid;
objContactInfo.Emailid = varEmail;
objContactInfo.Firstname = txtUsername.Text.ToString();
objContactInfo.Lastname = txtUsername.Text.ToString();
objContactInfo.Insert();
}
}
#endregion
#region If User is Not to be Created
else if (ViewState["UserCreate"].ToString() == "notcreate")
{
// FlagUserStatus = false;
}
#endregion
#endregion
ObjChange.Active = true;
ObjChange.Statusid = Convert.ToInt32(drpStatus.SelectedValue);
ObjChange.Categoryid = Convert.ToInt32(drpCategory.SelectedValue);
ObjChange.Subcategoryid = Convert.ToInt32(drpSubcategory.SelectedValue);
///ObjChange.Technician = "";
ObjChange.Title = txtTitle.Text;
ObjChange.Description = txtDescription.Text;
ObjChange.Createdtime = DateTime.Now.ToString();
ObjChange.Changetype = Convert.ToInt32(drpchangetype.SelectedValue);
ObjChange.Approvalstatus = "Send For Approval";
MembershipUser user = Membership.GetUser();
string username = user.UserName.ToString();
objOrganization = objOrganization.Get_Organization();
ObjUserLogin = ObjUserLogin.Get_UserLogin_By_UserName(username, objOrganization.Orgid);
int userid = Convert.ToInt32(ObjUserLogin.Userid);
ObjChange.CreatedByID = userid;
//////////change doneby meenakshi
objservice = objservice.Get_By_id(Convert.ToInt32(drpservices.SelectedValue));
if (objservice.servicename != null)
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:101,代码来源:CreateChangefromIncident.aspx.cs
示例4: btnSolutionAdd_Click
protected void btnSolutionAdd_Click(object sender, EventArgs e)
{
string userName;
MembershipUser User = Membership.GetUser();
userName = User.UserName.ToString();
int userid;
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
int Solutionid;
ObjSolution.Title = txtTitle.Text.ToString();
ObjSolution.Content=Editor.Text.ToString();
ObjSolution.Topicid = Convert.ToInt16(drpTopic.SelectedValue);
ObjSolution.Solution = drpSolutionType.SelectedValue;
ObjSolution.Insert();
Solutionid = ObjSolutionKeyword.Get_SolutionId();
ObjSolutionKeyword.Keywords=txtKeywords.Text.ToString();
ObjSolutionKeyword.Solutionid = Solutionid;
ObjSolutionKeyword.Insert();
ObjSolutionCreator.Solutionid = Solutionid;
ObjSolutionCreator.Createdby = objUser.Userid;
ObjSolutionCreator.Insert();
objSentMailToUser.SentMailToPManager(Solutionid);
Response.Redirect("ViewSolution.aspx?solutionid" + Solutionid);
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:25,代码来源:AddSolution.aspx.cs
示例5: btnMapped_Click
protected void btnMapped_Click(object sender, EventArgs e)
{
//lblErrorMsg.Text = "";
int flag = 0;
foreach (GridViewRow gv in grdvwViewUser.Rows)
{
string gvIDs;
RadioButton selectonebutton = (RadioButton)gv.FindControl("selectone");
if (selectonebutton.Checked)
{
flag = 1;
gvIDs = ((Label)gv.FindControl("lblUserID")).Text.ToString();
userid = Convert.ToInt16(gvIDs);
objUser = objUser.Get_By_id(userid);
string username = objUser.Username.ToString();
Session["username"] = username;
Session["userid"] = userid;
Session["flag"] = flag;
Session["flag2"] = flag;
break;
}
}
string myScript;
myScript = "<script language=javascript>javascript:refreshParent(); javascript:window.close();</script>";
Page.RegisterClientScriptBlock("MyScript", myScript);
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:26,代码来源:SelectUser.aspx.cs
示例6: updatecomment
public void updatecomment()
{
string userName;
MembershipUser User = Membership.GetUser();
solutionstatusid = Convert.ToInt32(Request.QueryString[0]);
flag = Convert.ToInt32(Request.QueryString[1]);
int userid;
if (flag == 3)
{
string seeionsid = Session["SolutionId"].ToString();
string[] str = seeionsid.Split(new char[] { ',' });
foreach (string s in str)
{
if (s == "")
{
break;
}
int solid = Convert.ToInt32(s);
ObjSolution = ObjSolution.Get_By_id(solid);
ObjSolution.Title = ObjSolution.Title;
ObjSolution.Topicid = ObjSolution.Topicid;
ObjSolution.Content = ObjSolution.Content;
ObjSolution.Comments = txtcomments.Text;
ObjSolution.SolutionStatus = solutionstatusid;
ObjSolution.Update();
userName = User.UserName.ToString();
Objorganization = Objorganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, Objorganization.Orgid);
ObjSolutionCreator.Solutionid = solid;
ObjSolutionCreator.LastUpdateBy = objUser.Userid;
ObjSolutionCreator.Update();
}
}
else
{
int solutionid = Convert.ToInt32(Request.QueryString[1]);
ObjSolution = ObjSolution.Get_By_id(solutionid);
ObjSolution.Title = ObjSolution.Title;
ObjSolution.Topicid = ObjSolution.Topicid;
ObjSolution.Content = ObjSolution.Content;
ObjSolution.Comments = txtcomments.Text;
ObjSolution.SolutionStatus = solutionstatusid;
ObjSolution.Update();
userName = User.UserName.ToString();
Objorganization = Objorganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, Objorganization.Orgid);
ObjSolutionCreator.Solutionid = solutionid;
ObjSolutionCreator.LastUpdateBy = objUser.Userid;
ObjSolutionCreator.Update();
}
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:58,代码来源:ApproveActions.aspx.cs
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string strStatusClose = Resources.MessageResource.strStatusClose.ToString().Trim();
string statusString = "";
int incidentid =Convert.ToInt16(Request.QueryString[0]);
Objincident = Objincident.Get_By_id(incidentid);
Objincidentstate = Objincidentstate.Get_By_id(incidentid);
Objincidentresoution = Objincidentresoution.Get_By_id(incidentid);
objstatus = objstatus.Get_By_id(Objincidentstate.Statusid);
statusString = objstatus.Statusname.ToString();
if (statusString.ToLower() == strStatusClose.ToLower())
{
lbltcktno.Text = Objincident.Incidentid.ToString();
lblcreatedate.Text = Objincident.Createdatetime.ToString();
if (Objincidentstate.AssignedTime != null)
{
lblstarttime.Text = Objincidentstate.AssignedTime.ToString();
}
lblendtime.Text = Objincident.Completedtime.ToString();
Objcategory=Objcategory.Get_By_id(Objincidentstate.Categoryid);
lblcomponenteffected.Text = Objcategory.CategoryName.ToString();
lbldescription.Text = Objincident.Title.ToString();
string bb = Objincidentresoution.Resolution.ToString();
string stripped = Regex.Replace(bb,@"<(.|\n)*?>",string.Empty);
lblresolution.Text = stripped.ToString();
//bind data to data bound controls and do other stuff
objUser = objUser.Get_By_id(Objincident.Requesterid);
lblcustomer.Text = objUser.Username.ToString();
objUser = objUser.Get_By_id(Objincidentstate.Technicianid);
lblengineer.Text = objUser.Username.ToString();
objstatus = objstatus.Get_By_id(Objincidentstate.Statusid);
lblrcaresult.Text = objstatus.Statusname.ToString();
}
Response.Clear(); //this clears the Response of any headers or previous output
Response.Buffer = true; //make sure that the entire output is rendered simultaneously
///
///Set content type to MS Excel sheet
///Use "application/msword" for MS Word doc files
///"application/pdf" for PDF files
///
Response.ContentType = "application/vnd.ms-excel";
StringWriter stringWriter = new StringWriter(); //System.IO namespace should be used
HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
///
///Render the entire Page control in the HtmlTextWriter object
///We can render individual controls also, like a DataGrid to be
///exported in custom format (excel, word etc)
///
this.RenderControl(htmlTextWriter);
Response.Write(stringWriter.ToString());
Response.End();
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:58,代码来源:RCA.aspx.cs
示例8: BindDropSite
protected void BindDropSite()
{
string userName = "";
MembershipUser User = Membership.GetUser();
if (User != null)
{
userName = User.UserName.ToString();
}
if (userName != "")
{
int userid;
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
if (objUser.Userid != 0)
{
userid = objUser.Userid;
colUserToSite = ObjUserToSite.Get_All_By_userid(userid);
foreach (UserToSiteMapping obj in colUserToSite)
{
int siteid;
Site_mst objSite1 = new Site_mst();
siteid = obj.Siteid;
objSite1 = objSite1.Get_By_id(siteid);
if (objSite1.Siteid != 0)
{
colSite.Add(objSite1);
}
}
}
drpSite.DataTextField = "sitename";
drpSite.DataValueField = "siteid";
drpSite.DataSource = colSite;
drpSite.DataBind();
ListItem item = new ListItem();
item.Text = "-------------Select-------------";
item.Value = "0";
drpSite.Items.Add(item);
drpSite.SelectedValue = "0";
//drpSite1.DataTextField = "sitename";
//drpSite1.DataValueField = "siteid";
//drpSite1.DataSource = colSite;
//drpSite1.DataBind();
//ListItem item1= new ListItem();
//item1.Text = "-------------Select-------------";
//item1.Value = "0";
//drpSite1.Items.Add(item1);
//drpSite1.SelectedValue = "0";
}
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_HT,代码行数:54,代码来源:Default.aspx.cs
示例9: btnapprove_Click
protected void btnapprove_Click(object sender, EventArgs e)
{
int userid=0;
int incidentid = Convert.ToInt16(Session["incidentid"].ToString());
if (incidentid != 0)
{
//objIncidentLog = objIncidentLog.Get_By_id(incidentid);
//if (objIncidentLog.Incidentid != 0)
//{
// objIncidentLog.Incidentid = incidentid;
// objIncidentLog.Incidentlog = txtcomments.Text;
// objIncidentLog.Update();
//}
//else
//{
// objIncidentLog.Incidentid = incidentid;
// objIncidentLog.Incidentlog = txtcomments.Text;
// objIncidentLog.Insert();
//}
string userName="";
MembershipUser User = Membership.GetUser();
if (User != null)
{
userName = User.UserName.ToString();
}
if (userName != "")
{
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
if (objUser.Userid != 0)
{
userid = objUser.Userid;
}
}
objIncidentLog.Incidentid = incidentid;
objIncidentLog.Userid = userid;
objIncidentLog.Incidentlog = txtcomments.Text;
objIncidentLog.Insert();
string myScript;
myScript = "<script language=javascript>javascript:refreshParent(); javascript:window.close();</script>";
Page.RegisterClientScriptBlock("MyScript", myScript);
}
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:52,代码来源:IncidentLog.aspx.cs
示例10: btnapprove_Click
protected void btnapprove_Click(object sender, EventArgs e)
{
/////Add Exception handilng try catch change by vishal 21-05-2012
try
{
int userid = 0;
int incidentid = Convert.ToInt32(Session["incidentid"].ToString());
if (incidentid != 0)
{
string userName = "";
MembershipUser User = Membership.GetUser();
if (User != null)
{
userName = User.UserName.ToString();
}
if (userName != "")
{
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
if (objUser.Userid != 0)
{
userid = objUser.Userid;
}
}
objIncidentLog.Incidentid = incidentid;
objIncidentLog.Userid = userid;
objIncidentLog.Incidentlog = txtcomments.Text;
objIncidentLog.Insert();
string myScript;
myScript = "<script language=javascript>javascript:window.close();</script>";
Page.RegisterClientScriptBlock("MyScript", myScript);
}
}
catch (Exception ex)
{
string myScript;
myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
Page.RegisterClientScriptBlock("MyScript", myScript);
return;
}
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:47,代码来源:IncidentLog1.aspx.cs
示例11: btnSolutionAdd_Click
protected void btnSolutionAdd_Click(object sender, EventArgs e)
{
///Add Exception handilng try catch change by vishal 21-05-2012
try
{
string userName;
MembershipUser User = Membership.GetUser();
userName = User.UserName.ToString();
int userid;
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
int Solutionid;
ObjSolution.Title = txtTitle.Text.ToString();
ObjSolution.Content=Editor.Text.ToString();
ObjSolution.Topicid = Convert.ToInt32(drpTopic.SelectedValue);
ObjSolution.Solution = drpSolutionType.SelectedValue;
ObjSolution.Insert();
Solutionid = ObjSolutionKeyword.Get_SolutionId();
ObjSolutionKeyword.Keywords=txtKeywords.Text.ToString();
ObjSolutionKeyword.Solutionid = Solutionid;
ObjSolutionKeyword.Insert();
ObjSolutionCreator.Solutionid = Solutionid;
ObjSolutionCreator.Createdby = objUser.Userid;
ObjSolutionCreator.Insert();
objSentMailToUser.SentMailToPManager(Solutionid);
Response.Redirect("ViewSolution.aspx?solutionid" + Solutionid);
}
catch (Exception ex)
{
string myScript;
myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
Page.RegisterClientScriptBlock("MyScript", myScript);
return;
}
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:36,代码来源:AddSolution.aspx.cs
示例12: ShowResolution
protected void ShowResolution()
{
IncidentResolution objIncidentResolution = new IncidentResolution();
#region Declaration of Dynamic Table,and Placeholder
PlaceHolderResolution.Controls.Clear();
Table tbl = new Table();
PlaceHolderResolution.Controls.Add(tbl);
int hdwidth = 1500;
int height = 5;
#endregion
int incidentid = Convert.ToInt32(Session["incidentid"].ToString());
#region Get Collection of Log From IncidentLog table via incidentid
colIncidentResolution = objIncidentResolution.Get_All_By_incidentid(incidentid);
if (colIncidentResolution.Count == 0)
{
TableRow tabRow3 = new TableRow();
TableCell tbCell3 = new TableCell();
tbCell3.Width = hdwidth;
tbCell3.Height = height;
Label lbl3 = new Label();
lbl3.Text = "No Record Found";
lbl3.Font.Size = FontUnit.Smaller;
tbCell3.Controls.Add(lbl3);
tabRow3.Cells.Add(tbCell3);
tbl.Rows.Add(tabRow3);
}
foreach (IncidentResolution obj in colIncidentResolution)
{
#region Fetch Username on the basis of Operationownerid,by calling Get_By_id() function of Userlogin_mst Instance
string username;
objUser = objUser.Get_By_id(obj.Userid);
username = objUser.Username.ToString();
#endregion
#region Declaration of Tablerow,TableCell and lable object
TableRow tabRow = new TableRow();
TableCell tbCell = new TableCell();
tbCell.Width = hdwidth;
Label lbl = new Label();
#endregion
#region Print Each Operation Performed by User
lbl.Font.Bold = true;
lbl.Text = " " + username + " said on " + obj.Lastupdatetime.ToString();
#endregion
#region Fix background color of Row
tabRow.BackColor = System.Drawing.Color.Lavender;
#endregion
#region Add label,cell,and Row to tabel
tbCell.Controls.Add(lbl);
tabRow.Cells.Add(tbCell);
tbl.Rows.Add(tabRow);
#endregion
#region Declaration of local variables,tablerow,tablecell and label
TableRow tabRowInner = new TableRow();
TableCell tbCellInner = new TableCell();
tbCellInner.Width = hdwidth;
Label lblinner = new Label();
lblinner.Font.Size = FontUnit.Smaller;
#endregion
#region Print Each Operation Performed by User
lblinner.Font.Bold = true;
lblinner.Text = " " + obj.Resolution.ToString();
#endregion
#region Label,cells and rows to Tabel of inner loop
tabRowInner.BackColor = System.Drawing.Color.White;
tbCellInner.Controls.Add(lblinner);
tabRowInner.Cells.Add(tbCellInner);
tbl.Rows.Add(tabRowInner);
#endregion
}
#endregion
}
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:83,代码来源:IncidentRequestUpdate.aspx.cs
示例13: grdvwRequest_RowDataBound
protected void grdvwRequest_RowDataBound(Object sender, GridViewRowEventArgs e)
{
/////Add Exception handilng try catch change by vishal 21-05-2012
try
{
System.Drawing.ColorConverter colConvert = new ColorConverter();
BLLCollection<ColorScheme_mst> colColor = new BLLCollection<ColorScheme_mst>();
if (e.Row.RowType == DataControlRowType.DataRow)
{
#region Autogenerate Serial number
Label lblSerial = (Label)e.Row.FindControl("lblSerial");
lblSerial.Text = i.ToString();
i++;
#endregion
int TotalTimeSpentonCall;
int TotalResolutionTime;
int varIncidentid = Convert.ToInt32(((Label)e.Row.FindControl("incidentid")).Text.ToString());
string varCreateDatetime = e.Row.Cells[9].Text;
string varStatusOpen = Resources.MessageResource.strStatusOpen.ToString();
string varStatusClose = Resources.MessageResource.strStatusClose.ToString();
string varStatusOnHold = Resources.MessageResource.strStatusOnHold.ToString();
string varStatusResolved = Resources.MessageResource.strStatusResolved.ToString();
#region Bind Data Row at Run time with requesterid to Requester name
int requesterid = Convert.ToInt32(e.Row.Cells[3].Text);
//objUser = objUser.Get_By_id(requesterid);
objContactmst = objContactmst.Get_By_id(requesterid);
//if (objUser.Userid != 0)
//{
// e.Row.Cells[3].Text = objUser.Username.ToString();
// //e.Row.Cells[3].Text = objContactmst.Firstname.ToString();
//}
//else { e.Row.Cells[3].Text = ""; }
//if (objUser.Userid != 0)
//{
//e.Row.Cells[3].Text = objUser.Username.ToString();
if (objContactmst.Firstname != null)
{
e.Row.Cells[3].Text = objContactmst.Firstname.ToString();
}
// }else { e.Row.Cells[3].Text = ""; }
#endregion
#region Bind Datarow at Run Time with Createdbyid to Created by name
int createdbyid = Convert.ToInt32(e.Row.Cells[4].Text);
objUser = objUser.Get_By_id(createdbyid);
if (objUser.Userid != 0)
{
e.Row.Cells[4].Text = objUser.Username.ToString();
}
else { e.Row.Cells[4].Text = ""; }
#endregion
#region Bind Datarow at Run Time with technicianid to technician name
int technicianid = Convert.ToInt32(e.Row.Cells[5].Text);
objUser = objUser.Get_By_id(technicianid);
if (objUser.Userid != 0)
{
e.Row.Cells[5].Text = objUser.Username.ToString();
}
else { e.Row.Cells[5].Text = ""; }
#endregion
#region Bind Datarow at run time with Statusid to Status
int statusid = Convert.ToInt32(e.Row.Cells[6].Text);
objStatus = objStatus.Get_By_id(statusid);
if (objStatus.Statusid != 0)
{
e.Row.Cells[6].Text = objStatus.Statusname.ToString();
}
else { e.Row.Cells[6].Text = ""; }
#endregion
#region Bind Datarow at run time with Priorityid to Priority
int priorityid = Convert.ToInt32(e.Row.Cells[7].Text);
objPriority = objPriority.Get_By_id(priorityid);
if (objPriority.Priorityid != 0)
{ e.Row.Cells[7].Text = objPriority.Name.ToString(); }
else { e.Row.Cells[7].Text = ""; }
#endregion
#region Bind Datarow at run time with Siteid to Site
int siteid = Convert.ToInt32(e.Row.Cells[8].Text);
objSite = objSite.Get_By_id(siteid);
if (objSite.Siteid != 0)
{
string custSiteName;
int custid = 0;
colCustToSite = objCustToSite.Get_All_By_siteid(objSite.Siteid);
foreach (CustomerToSiteMapping objCuToSite in colCustToSite)
{
custid = objCuToSite.Custid;
}
objCustomer = objCustomer.Get_By_id(custid);
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_HT,代码行数:101,代码来源:Default.aspx.cs
示例14: BindGridForSelectedParameter
protected void BindGridForSelectedParameter()
{
#region Declaration of localvariable and table Variable
int filterId;
DataTable dtTable = new DataTable();
dtTable = CreateDataTable();
string userName = "";
int varTechnicianId = Convert.ToInt32(drpTechnician.SelectedValue);
string varSortParameter = "";
varSortParameter = drpSort.SelectedValue;
if (varSortParameter == "0")
{ varSortParameter = "createdatetime"; }
#endregion
#region Get Current User and his Role
MembershipUser User = Membership.GetUser();
string varUserRole = "";
string varRoleTechnician = "";
if (User != null)
{
userName = User.UserName.ToString();
string[] arrUserRole = Roles.GetRolesForUser();
varUserRole = arrUserRole[0].ToString();
varRoleTechnician = Resources.MessageResource.strTechnicianRole.ToString();
}
#endregion
#region Get User object by Calling Function Get_UserLogin_By_UserName() via passing parameter username and organizationid
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
#endregion
#region If User Exist
if (objUser.Userid != 0)
{
string fromdate = null;
string todate = null;
if (ViewState["fromdate"] != null)
{
fromdate = ViewState["fromdate"].ToString();
}
if (ViewState["todate"] != null)
{
todate = ViewState["todate"].ToString();
}
if (fromdate == "")
{ fromdate = null; }
if (todate == "")
{ todate = null; }
#region Declare Local Variables and Collection of Incident_mst Type
string Status;
BLLCollection<Incident_mst> col = new BLLCollection<Incident_mst>();
int siteid;
#endregion
#region Get the Siteid and Filter Parameter
siteid = Convert.ToInt32(drpSite.SelectedValue);
filterId = Convert.ToInt32(drpFilter.SelectedValue);
#endregion
#region If Role of User is Technician
if (varUserRole == varRoleTechnician)
{
lblTechnician.Visible = false;
drpTechnician.Visible = false;
#region If Filter Variable is All
if (filterId == 0)
{
col = objIncident.Get_All_By_Siteid_Technicianid(siteid, objUser.Userid, fromdate, todate, varSortParameter);
}
#endregion
#region If Filter Variable is Open
else if (filterId == 1)
{
Status = Resources.MessageResource.strStatusOpen.ToString();
int statusid;
statusid = objStatus.Get_By_StatusName(Status);
col = objIncident.Get_All_By_Siteid_Statusid_technicianid(siteid, statusid, objUser.Userid, fromdate, todate, varSortParameter);
}
#endregion
#region If Filter variable is Onhold
else if (filterId == 2)
{
Status = Resources.MessageResource.strStatusOnHold.ToString();
int statusid;
statusid = objStatus.Get_By_StatusName(Status);
col = objIncident.Get_All_By_Siteid_Statusid_technicianid(siteid, statusid, objUser.Userid, fromdate, todate, varSortParameter);
}
#endregion
#region If Filter Variable is Close
else if (filterId == 3)
{
Status = Resources.MessageResource.strStatusClose.ToString();
int statusid;
statusid = objStatus.Get_By_StatusName(Status);
col = objIncident.Get_All_By_Siteid_Statusid_technicianid(siteid, statusid, objUser.Userid, fromdate, todate, varSortParameter);
}
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_HT,代码行数:101,代码来源:Default.aspx.cs
示例15: BindGridForAllParameter
protected void BindGridForAllParameter()
{
#region Declaration of localvariable and table Variable
int filterId;
DataTable dtTable = new DataTable();
dtTable = CreateDataTable();
string userName = "";
int varTechnicianId = 0;
if (drpTechnician.SelectedValue != "") { varTechnicianId = Convert.ToInt32(drpTechnician.SelectedValue); }
string varSortParameter = "";
varSortParameter = drpSort.SelectedValue;
if (varSortParameter == "0")
{ varSortParameter = "createdatetime"; }
#endregion
#region Get Current User and his Role
MembershipUser User = Membership.GetUser();
string varUserRole = "";
string varRoleTechnician = "";
if (User != null)
{
userName = User.UserName.ToString();
string[] arrUserRole = Roles.GetRolesForUser();
varUserRole = arrUserRole[0].ToString();
varRoleTechnician = Resources.MessageResource.strTechnicianRole.ToString();
}
#endregion
#region Get User object by Calling Function Get_UserLogin_By_UserName() via passing parameter username and organizationid
objOrganization = objOrganization.Get_Organization();
objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
#endregion
#region if UserExist
if (objUser.Userid != 0)
{
ViewState["Userid"] = objUser.Userid;
string fromdate = null;
string todate = null;
if (ViewState["fromdate"] != null)
{
fromdate = ViewState["fromdate"].ToString();
}
if (ViewState["todate"] != null)
{
todate = ViewState["todate"].ToString();
}
if (fromdate == "")
{ fromdate = null; }
if (todate == "")
{ todate = null; }
#region Declare Local Variables and Collection of Incident_mst Type
string Status;
// int siteid;
#endregion
#region Get the Siteid and Filter Parameter
//siteid = obj.Siteid;
filterId = Convert.ToInt32(drpFilter.SelectedValue);
#endregion
#region If Role of User is Technician
if (varUserRole == varRoleTechnician)
{
lblTechnician.Visible = false;
drpTechnician.Visible = false;
//lblTechnician1.Visible = false;
//drpTechnician1.Visible = false;
//btnAssigned.Visible = false;
#region If Filter Variable is All
if (filterId == 0)
{
// col = objIncident.Get_All_By_Siteid_Technicianid(siteid, objUser.Userid, fromdate, todate, varSortParameter);
}
#endregion
#region If Filter Variable is Requested
else if (filterId == 1)
{
Status = Resources.MessageResource.strChangestatusrequested.ToString();
int statusid;
statusid = ObjChangeStatus.Get_By_StatusName(Status);
col = ObjChange.Get_All_By_Statusid_technicianid(statusid, objUser.Userid, fromdate, todate, varSortParameter);
}
#endregion
#region If Filter Variable is Approval
else if (filterId == 2)
{
Status = Resources.MessageResource.StrApproval.ToString();
int statusid;
statusid = ObjChangeStatus.Get_By_StatusName(Status);
col = ObjChange.Get_All_By_Statusid_technicianid(statusid, objUser.Userid, fromdate, todate, varSortParameter);
}
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_HT,代码行数:101,代码来源:ViewChange.aspx.cs