/// <summary> /// 转换成字符串 /// </summary> /// <returns></returns> public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", BillID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BusinessID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillType.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrBillType, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillStatus.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrBillStatus, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillMonth, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BeginTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", EndTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", LimitTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); if (FullPaidTime.HasValue) { sb.AppendFormat("{0}{1}", FullPaidTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); } else { sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1); } sb.AppendFormat("{0}{1}", IsCurrent.ToString(), WebServiceConst.Separater_1); sb.Append(IsShelve.ToString()); return(sb.ToString()); }
/// <summary> /// 转换成字符串 /// </summary> /// <returns></returns> public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", ReceivedID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillItemID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", Amount.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", ReceivedType.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", PayID.ToString(), WebServiceConst.Separater_1); if (ReceivedTime.HasValue) { sb.AppendFormat("{0}{1}", ReceivedTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); } else { sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1); } sb.AppendFormat("{0}{1}", CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); if (ToAcountTime.HasValue) { sb.AppendFormat("{0}{1}", ToAcountTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); } else { sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1); } if (ToAccountID.HasValue) { sb.AppendFormat("{0}{1}", ToAccountID.Value.ToString(), WebServiceConst.Separater_1); } else { sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1); } sb.AppendFormat("{0}{1}", OperatorID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", Explain, WebServiceConst.Separater_1); sb.Append(DeductionID.ToString()); return(sb.ToString()); }
/// <summary> /// 取得主从连接主表连接字段值 /// </summary> /// <param name="masterfield">主表连接字段</param> /// <returns></returns> public string GetMasterLinkValue(string masterfield) { string sResult = ""; if (masterfield.Trim().ToUpper() == "ID") { sResult = BillID.ToString(); } else { try { RegisterMethod(MasterDALName, true); sResult = GetDataSet(1, "ID=" + BillID.ToString(), "ID").Tables[0].Rows[0][masterfield].ToString(); } catch (Exception) { BWS.ERP.BaseControl.Public.SystemInfo("主从表连接字段设置错误!", true); } } return(sResult); }
/// <summary> /// 转换成字符串 /// </summary> /// <returns></returns> public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}{1}", BillItemID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BillID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", Subject.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrSubject, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", SubjectType.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", Amount.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", DueAmt.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", ReceivedAmt.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", PenaltyIntAmt.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); if (FullPaidTime.HasValue) { sb.AppendFormat("{0}{1}", FullPaidTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1); } else { sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1); } sb.AppendFormat("{0}{1}", OperatorID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", IsCurrent.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", IsShelve.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", BusinessID.ToString(), WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrAmount, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrDueAmt, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrReceivedAmt, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrReceived, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", StrReceivable, WebServiceConst.Separater_1); sb.AppendFormat("{0}{1}", Display, WebServiceConst.Separater_1); sb.Append(StrCreateTime); return(sb.ToString()); }
protected void lvCMBill_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 BillID; Int64.TryParse(e.CommandArgument.ToString(), out BillID); if (BillID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _BillID = BillID; String url = UrlHelper.BuildSecureUrl("~/CM/CMBill.aspx", string.Empty, UrlConstants.OVERVIEW_CM_BILL_ID, BillID.ToString()).ToString(); Response.Redirect(url); } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(CMBillEntity.FLD_NAME_BillID, BillID.ToString(), SQLMatchType.Equal); CMBillEntity cMBillEntity = new CMBillEntity(); result = FCCCMBill.GetFacadeCreate().Delete(cMBillEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _BillID = 0; _CMBillEntity = new CMBillEntity(); BindCMBillList(); MiscUtil.ShowMessage(lblMessage, "C MBill has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete C MBill.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public override void DoPrint() { base.DoPrint(); report.AddReportData(BWS.ERP.DataAccess.DbHelperSQL.Query("SELECT * FROM sysRoles WHERE ID=" + BillID.ToString()).Tables[0], "主表"); //report.AddReportData((IEnumerable)bdsMain.Current, "主表"); report.AddReportData(LDetailDataSet[LDetailDALName.IndexOf("sysRolesRightsDAL")].Tables[0], "角色权限"); report.AddReportData(LDetailDataSet[LDetailDALName.IndexOf("sysRolesUserDAL")].Tables[0], "角色用户"); report.ReportMenu.Show(btnPrint, new Point(0, btnPrint.Height)); }
private void btnUnAuditing_Click(object sender, EventArgs e) { try { if (!BWS.ERP.Security.SecurityCenter.IsAdmin) { BWS.ERP.BaseControl.Public.SystemInfo("您没有反审核权限!"); return; } if (bdsMain.Current != null && ((DataRowView)bdsMain.Current).Row["iFlag"].ToString() == "4") { if (BWS.ERP.BaseControl.Public.SystemInfo("是否反审核?", 4) == DialogResult.Yes) { string sSql = "UPDATE stkGoodInStockMaster SET iFlag=2 WHERE ID=" + BillID.ToString(); BWS.ERP.DataAccess.DbHelperSQL.ExecuteSql(sSql); ((DataRowView)bdsMain.Current).Row["iFlag"] = 2; bdsMain.EndEdit(); } } } catch (Exception) { throw; } }
protected void lvCMBill_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 BillID; Int64.TryParse(e.CommandArgument.ToString(), out BillID); if (BillID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _BillID = BillID; PrepareEditView(); if (CurrentCMBillEntity != null) { if (CurrentCMBillEntity.BillApprovalStatusID != MasterDataConstants.BillApprovalStatus.INITIATED) { } } } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(CMBillEntity.FLD_NAME_BillID, BillID.ToString(), SQLMatchType.Equal); CMBillEntity cMBillEntity = new CMBillEntity(); result = FCCCMBill.GetFacadeCreate().Delete(cMBillEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _BillID = 0; _CMBillEntity = new CMBillEntity(); PrepareInitialView(); BindCMBillList(); MiscUtil.ShowMessage(lblMessage, "Bill has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete Bill.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }