本文整理汇总了C#中Attendance.BAL.Report.SavePettyCashDetails方法的典型用法代码示例。如果您正苦于以下问题:C# Report.SavePettyCashDetails方法的具体用法?C# Report.SavePettyCashDetails怎么用?C# Report.SavePettyCashDetails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attendance.BAL.Report
的用法示例。
在下文中一共展示了Report.SavePettyCashDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
Attendance.Entities.PettyCashInfo objInfo = new Attendance.Entities.PettyCashInfo();
objInfo.AccountName = txtName.Text==""?"":GeneralFunction.ToProper(txtName.Text);
objInfo.AmountType = ddlIncomeType.SelectedItem.Text;
objInfo.AccountDate = txtDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtDate.Text);
objInfo.InitialAmoun = txtIncome.Text;
objInfo.FromWhom = txtFrmWhom.Text == "" ? "" : GeneralFunction.ToProper(txtFrmWhom.Text);
objInfo.ChequeNum = txtChequeNum.Text;
objInfo.ExpenseAmount = txtExpenseAmnt.Text;
objInfo.ExpenseDate = txtExpenseDate.Text == "" ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(txtExpenseDate.Text);
objInfo.Expensetype = txtExpenseType.Text;
objInfo.ExpenseSubType = txtExpenseSubType.Text;
objInfo.ExpenseManName = txtServiceName.Text == "" ? "" : GeneralFunction.ToProper(txtServiceName.Text);
objInfo.BillNum = txtBillNum.Text;
objInfo.VoucherNum = txtVoucherNum.Text;
objInfo.Notes = txtNotes.Text == "" ? "" : GeneralFunction.ToProperNotes(txtNotes.Text);
string Locationname = Session["LocationName"].ToString();
int UserID = Convert.ToInt32(Session["UserID"]);
Attendance.BAL.Report obj = new Report();
bool bnew = obj.SavePettyCashDetails(objInfo, UserID, Locationname);
if (bnew)
{
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "alert('Saved successfully..');", true);
GetPettyCashDetails();
}
}
catch (Exception ex)
{
}
}