using Swift.DAL.ExchangeSystem.LedgerSetup;
using Swift.web.Library;
using System;
using System.Data;
using System.Text;
namespace Swift.web.include
{
public partial class CreateGL : System.Web.UI.Page
{
private LedgerDao _obj = new LedgerDao();
private StringBuilder _str = new StringBuilder();
private SwiftLibrary _sl = new SwiftLibrary();
protected void Page_Load(object sender, EventArgs e)
{
_sl.CheckSession();
LoadGL();
CreateNewGL();
}
private void LoadGL()
{
string pId = GetReportParentId();
var dt = _obj.GetLedgerSubHeader(pId);
_str.Append("
");
_str.Append("
");
if (dt == null || dt.Rows.Count == 0)
{
return;
}
foreach (DataRow dr in dt.Rows)
{
_str.Append("- ");
_str.Append(" ");
_str.Append("");
// _str.Append("
//
// ");
_str.Append("" + dr["gl_code"] + "-" + dr["gl_desec"] + "(" + dr["tree_sape"] + ")");
_str.Append(" ");
_str.Append("
");
_str.Append("- ");
_str.Append("");
_str.Append("
");
//_str.Append("
");
}
_str.Append("");
getLedgerGl.InnerHtml = _str.ToString();
}
private void CreateNewGL()
{
var str = new StringBuilder();
str.Append("");
str.Append("
");
str.Append("
");
str.Append("
New GL");
//str.Append("
New AC");
str.Append("
");
str.Append("
");
_str.Append("");
newDL.InnerHtml = str.ToString();
}
private string GetReportParentId()
{
return GetStatic.ReadQueryString("q", "");
}
}
}