本文整理汇总了C#中StoreSubmitDataEventArgs.Object方法的典型用法代码示例。如果您正苦于以下问题:C# StoreSubmitDataEventArgs.Object方法的具体用法?C# StoreSubmitDataEventArgs.Object怎么用?C# StoreSubmitDataEventArgs.Object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoreSubmitDataEventArgs
的用法示例。
在下文中一共展示了StoreSubmitDataEventArgs.Object方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SubmitData
protected void SubmitData(object sender, StoreSubmitDataEventArgs e)
{
string json = e.Json;
XmlNode xml = e.Xml;
List<Country> countries = e.Object<Country>();
StringBuilder sb = new StringBuilder(255);
sb.Append("Selected:");
foreach (Country country in countries)
{
sb.AppendFormat("{0},", country.ID);
}
this.txtTo1.Text = sb.ToString().Substring(0, sb.ToString().Length - 1);
}
示例2: SubmitData
protected void SubmitData(object sender, StoreSubmitDataEventArgs e)
{
string json = e.Json;
XmlNode xml = e.Xml;
List<Country> countries = e.Object<Country>();
StringBuilder sb = new StringBuilder(255);
sb.Append("<h3>Selected Countries</h3>");
foreach (Country country in countries)
{
sb.AppendFormat("{0}<br />", country.Name);
}
this.Label1.Html = sb.ToString();
}
示例3: SubmitData
//用于保存差旅费明细
protected void SubmitData(object sender, StoreSubmitDataEventArgs e)
{
DateTime dtnull = new DateTime(1, 1, 1, 0, 0, 0);
cs.DBCommand dbc = new cs.DBCommand();
//检查是否已经被该人设置过审批人
string sqlCheckFlow = "select * from GroupFlow where GID=(select GID from GroupUsers where UserID='" + cbxOwner.Text + "')";
DataTable dtCheckFlow = dbc.GetData("eReimbursement", sqlCheckFlow);
if (dtCheckFlow.Rows.Count < 1)
{
return;
}
string json = e.Json;
XmlNode xml = e.Xml;
List<Detail> Details = e.Object<Detail>();
//删除现有数据
string deletesql = "delete from ETraveleDetail where [No]='" + hdTravelRequestID.Value.ToString() + "'";
string newid1 = dbc.UpdateData("eReimbursement", deletesql, "Update");
foreach (Detail detail in Details)
{
if (newid1 == "-1")
{
ErrorHandle("Data Error.");
return;
}
//新增
string word = "[No],[Tocity],[AccountName],[AccountCode],[AccountDes],[Cur],[Pamount],[Camount],[TSation],[Createdby],[CreadedDate],[Tdate]";
string value = "";
value += "'" + hdTravelRequestID.Value.ToString() + "',";
value += "'" + detail.Tocity + "',";
value += "'" + detail.AccountName + "',";
value += "'" + detail.AccountCode + "',";
value += "'" + detail.AccountDes + "',";
value += "'" + detail.Cur + "',";
value += detail.Pamount == "" ? "null," : detail.Pamount + ",";
value += detail.Camount == "" ? "null," : detail.Camount + ",";
value += "'" + detail.TSation + "',";
value += "'" + cbxOwner.Text + "',";//edit
value += "'" + DateTime.Now.ToString() + "',";
value += detail.Tdate == "" ? "null" : "'" + detail.Tdate + "'";
string updatesql = "insert into ETraveleDetail (" + word + ") values(" + value + ");select [ID][email protected]@IDENTITY from ETraveleDetail";
string newid = dbc.UpdateData("eReimbursement", updatesql, "Insert");
if (newid == "-1")
{
ErrorHandle("Data Error."); return;
}
}
//发送提醒邮件
string sql = "select * from V_Eflow_ETravel where [Type]='T' and Step!=0 and RequestID=" + hdTravelRequestID.Value.ToString() + " order by Step,FlowID";
DataTable dtMail = new DataTable();
dtMail = dbc.GetData("eReimbursement", sql);
if (dtMail != null && dtMail.Rows.Count > 0)
{
DIMERCO.SDK.MailMsg mail = new DIMERCO.SDK.MailMsg();
mail.Title = "Dimerco eReimbursement (" + dtMail.Rows[0]["Person"].ToString() + ") - Seek For Your Approval";
mail.FromDispName = "eReimbursement";
mail.From = "[email protected]";
string mailto = "";
DataSet dsTo = DIMERCO.SDK.Utilities.LSDK.getUserProfilebyUserList(dtMail.Rows[0]["ApproverID"].ToString());
if (dsTo.Tables[0].Rows.Count == 1)
{
mailto += dsTo.Tables[0].Rows[0]["eMail"].ToString() + ",";
}
else
{
ErrorHandle("Error mail address of Approver."); return;
}
string mailcc = "";
DataSet dsCC = DIMERCO.SDK.Utilities.LSDK.getUserProfilebyUserList(dtMail.Rows[0]["PersonID"].ToString());
if (dsCC.Tables[0].Rows.Count == 1)
{
mailcc += dsCC.Tables[0].Rows[0]["eMail"].ToString() + ",";
}
else
{
ErrorHandle("Error mail address of Owner."); return;
}
if (dtMail.Rows[0]["CreadedByID"].ToString() != "" && dtMail.Rows[0]["CreadedByID"].ToString() != dtMail.Rows[0]["PersonID"].ToString())//代理人
{
dsCC = DIMERCO.SDK.Utilities.LSDK.getUserProfilebyUserList(dtMail.Rows[0]["CreadedByID"].ToString());
mailcc += dsCC.Tables[0].Rows[0]["eMail"].ToString() + ",";
}
mail.To = mailto;
mail.Cc = mailcc;
string divstyle = "style='font-size:small;'";
string divstyleCurrent = "style='font-size:small;color:blue;'";
string tdstyle = "style='border:silver 1px ridge; font-size:small;background-color: #FFFFFF'";
StringBuilder sb = new StringBuilder();
sb.Append("<div>");
sb.Append("<div " + divstyle + "> Dear " + dtMail.Rows[0]["Approver"].ToString() + ",</div><br />");
sb.Append("<div " + divstyle + ">The following eReimbursement application for your approval:</div><br /><br />");
sb.Append("<div " + divstyle + ">eReimbursement Approval Remarks :</div><br />");
sb.Append("<div " + divstyle + ">Owner:" + dtMail.Rows[0]["Person"].ToString() + "</div>");
sb.Append("<div " + divstyle + ">Station:" + dtMail.Rows[0]["Station"].ToString() + "</div>");
sb.Append("<div " + divstyle + ">Department:" + dtMail.Rows[0]["Department"].ToString() + "</div>");
//.........这里部分代码省略.........