本文整理汇总了C#中Utility.RemoveQueryStringByKey方法的典型用法代码示例。如果您正苦于以下问题:C# Utility.RemoveQueryStringByKey方法的具体用法?C# Utility.RemoveQueryStringByKey怎么用?C# Utility.RemoveQueryStringByKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utility
的用法示例。
在下文中一共展示了Utility.RemoveQueryStringByKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
LoanDSTableAdapters.FinancialsTableAdapter financials = new LoanDSTableAdapters.FinancialsTableAdapter();
if (!(type == "update"))
{
financials.InsertFinancials(MySessionManager.ClientID,
MySessionManager.AppID,
ddMonth.Text,
ddlYear.Text,
txtSales.Text,
txtCostOfSales.Text,
txtGrossProfit.Text,
txtAdminCost.Text,
txtNetProfit.Text,
MySessionManager.CurrentUser.UserID);
}
else if (type == "update")
{
financials.UpdateFinancials(ddMonth.Text,
ddlYear.Text,
txtSales.Text,
txtCostOfSales.Text,
txtGrossProfit.Text,
txtAdminCost.Text,
txtNetProfit.Text,
MySessionManager.CurrentUser.UserID,
id);
}
Utility util = new Utility();
Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "fiedit"));
}
}
示例2: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
try
{
// fetch the en-GB culture
CultureInfo ukCulture = new CultureInfo("en-GB");
// pass the DateTimeFormat information to DateTime.Parse
DateTime bDate = DateTime.Parse(txtBirthdate.Text, ukCulture.DateTimeFormat);
LoanDSTableAdapters.GuarantorTableAdapter guarantor = new LoanDSTableAdapters.GuarantorTableAdapter();
if (!(type == "update"))
{
guarantor.InsertGuarantor(MySessionManager.ClientID,
MySessionManager.AppID,
Convert.ToInt32(ddlGORR.Text),
txtfullname.Text,
txtRelationship.Text,
Convert.ToInt32(txtYrsAcquainted.Text),
Convert.ToInt32(ddlNationality.Text),
bDate,
txtMobile.Text,
txtHomeTelNo.Text,
txtOfficeTelNo.Text,
txtEmail.Text,
txtHomeAddress.Value.Trim(),
txtOfficeAddress.Value.Trim(),
MySessionManager.CurrentUser.UserID);
}
else if (type == "update")
{
guarantor.UpdateGuarantor(Convert.ToInt32(ddlGORR.Text),
txtfullname.Text,
txtRelationship.Text,
Convert.ToInt32(txtYrsAcquainted.Text),
Convert.ToInt32(ddlNationality.Text),
bDate,
txtMobile.Text,
txtHomeTelNo.Text,
txtOfficeTelNo.Text,
txtEmail.Text,
txtHomeAddress.Value.Trim(),
txtOfficeAddress.Value.Trim(),
id);
}
Utility util = new Utility();
Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "gedit"));
}
catch (Exception ex) { }
}
}