public int CreateCutBook(GridView Gd, string MID, string GLCD, string SUBGLCD, string FBRCD, string TBRCD, string EDT)
    {
        SqlCommand   cmd     = new SqlCommand();
        ClsOpenClose OC      = new ClsOpenClose();
        double       BALANCE = 0;

        try
        {
            string[] TD = EDT.Split('/');

            try
            {
                sql = "Exec ISP_AVS0167 @AsonDate='" + conn.ConvertDate(EDT) + "',@FBrCd='" + FBRCD + "' ,@TBrCd='" + TBRCD + "' ,@GlCode='" + GLCD + "',@SubGlCode='" + SUBGLCD + "',@MID='" + MID + "' ";
                res = conn.sBindGrid(Gd, sql);
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
            return(res);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //HttpContext.Current.//Response.Redirect("FrmLogin.aspx", true);
        }
        return(res);
    }
    public DataTable CreateCutBookRecSrno(string MID, string GLCD, string SUBGLCD, string BRCD, string EDT)
    {
        SqlCommand   cmd = new SqlCommand();
        ClsOpenClose OC  = new ClsOpenClose();

        try
        {
            string[] TD = EDT.Split('/');

            try
            {
                sql = "Exec RptCutBookReport_RecSrno @AsonDate='" + DBconn.ConvertDate(EDT) + "',@BrCd='" + BRCD + "' ,@GlCode='" + GLCD + "',@SubGlCode='" + SUBGLCD + "',@MID='" + MID + "' ";
                DT  = new DataTable();
                DT  = DBconn.GetDatatable(sql);
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
            return(DT);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //HttpContext.Current.//Response.Redirect("FrmLogin.aspx", true);
        }
        return(DT);
    }
Beispiel #3
0
    public DataTable CreateSIDDStoLoan(string FLAG, string status, string BRCD, string FDT, string TDT)//BRCD ADDED --Abhishek
    {
        SqlConnection conn = new SqlConnection();
        SqlCommand    cmd  = new SqlCommand();
        ClsOpenClose  OC   = new ClsOpenClose();

        try
        {
            //  string tbname;
            //sql = "SELECT AV.DRACCNO DR_ACCNO,MM2.CUSTNAME DR_NAME,AV.CRACCNO CR_ACCNO,MM1.CUSTNAME CR_NAME," +
            //" AV.SIAMOUNT INSTALLMENT,AV.STATUS STATUS,AV.FROMDATE FROM_DATE,AV.TODATE TO_DATE," +
            //" AV.NEXTEXECUTIONDATE NEXT_TRANSFER FROM AVS5007 AV " +
            //" INNER JOIN MASTER MM1 ON AV.CRCUSTNO=MM1.CUSTNO  AND AV.BRCD=MM1.BRCD  " +
            //" INNER JOIN MASTER MM2 ON AV.DRCUSTNO=MM2.CUSTNO  AND AV.BRCD=MM2.BRCD " +
            //" INNER JOIN GLMAST GG ON AV.DRSUBGL=GG.SUBGLCODE AND GG.BRCD=AV.BRCD  " +
            //" WHERE AV.STATUS='" + status + "' and AV.BRCD='" + BRCD + "'";
            sql = "EXEC SP_SI_REPORT @FLAG='" + FLAG + "',@STATUS='" + status + "',@BRCD='" + BRCD + "',@FDATE='" + DBconn.ConvertDate(FDT) + "',@TDATE='" + DBconn.ConvertDate(TDT) + "' ";
            DT  = DBconn.GetDatatable(sql);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
        return(DT);
    }
Beispiel #4
0
    public DataTable CreateAllOK(string Ason, string brcd)
    {
        DataTable     DT   = new DataTable();
        SqlConnection conn = new SqlConnection();
        SqlCommand    cmd  = new SqlCommand();
        ClsOpenClose  OC   = new ClsOpenClose();

        try
        {
            //  string tbname;
            sql = "Exec SP_ALLOK @ASONDT='" + DBconn.ConvertDate(Ason) + "',@BRCD='" + brcd + "'";


            DT = DBconn.GetDatatable(sql);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
        return(DT);
    }
    public DataTable CreateOutward(string FBC, string TBC, string FDT, string TDT, string BRCD, string FL)
    {
        DataTable     DT   = new DataTable();
        SqlConnection conn = new SqlConnection();
        SqlCommand    cmd  = new SqlCommand();
        ClsOpenClose  OC   = new ClsOpenClose();

        try
        {
            string   tbname;
            string[] TD = FDT.Split('/');

            if (FL == "OW")
            {
                tbname = "owg_" + TD[2].ToString() + TD[1].ToString();
            }
            else
            {
                tbname = "INWORD_" + TD[2].ToString() + TD[1].ToString();
            }
            sql = " SELECT OW.ACC_NO,M.CUSTNAME,OW.PRDUCT_CODE,GL.GLNAME,BANK.DESCR AS BANK_NAME,BRCD.DESCR AS BRANCH_NAME,OW.INSTRU_NO,OW.INSTRUDATE,OW.INSTRU_AMOUNT FROM " + tbname + " OW " +
                  " INNER JOIN AVS_ACC AC ON AC.ACCNO=OW.ACC_NO AND AC.SUBGLCODE=OW.PRDUCT_CODE AND AC.BRCD=OW.BRCD " +
                  " INNER JOIN MASTER M ON M.CUSTNO=AC.CUSTNO AND AC.BRCD=OW.BRCD " +
                  " INNER JOIN GLMAST GL ON GL.GLCODE=AC.GLCODE AND GL.SUBGLCODE=AC.SUBGLCODE " +
                  " LEFT JOIN (SELECT DESCR,BANKCD FROM RBIBANK WHERE STATECD=400 AND BRANCHCD=0) BANK ON BANK.BANKCD=OW.BANK_CODE " +
                  " LEFT JOIN (SELECT DESCR,BRANCHCD,BANKCD FROM RBIBANK WHERE STATECD=400) BRCD ON BRCD.BANKCD=OW.BANK_CODE AND BRCD.BRANCHCD=OW.BRANCH_CODE " +
                  " WHERE OW.STAGE <> 1004 And OW.PRDUCT_CODE Not In (503,504) And OW.ENTRYDATE BETWEEN '" + DBconn.ConvertDate(FDT) + "'AND '" + DBconn.ConvertDate(TDT) + "' AND OW.BRCD BETWEEN '" + FBC + "' AND '" + TBC + "' Order By OW.SET_NO";



            DT = DBconn.GetDatatable(sql);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
        return(DT);
    }
Beispiel #6
0
    public DataTable CreateDocReg(string FDU, string TDU, string FDT, string TDT, string BRCD)
    {
        DataTable     DT   = new DataTable();
        SqlConnection conn = new SqlConnection();
        SqlCommand    cmd  = new SqlCommand();
        ClsOpenClose  OC   = new ClsOpenClose();

        try
        {
            sql = " SELECT AV.ACCNO,M.CUSTNAME,AV.DATEOFUPLOAD,AV.Photo_Type FROM AVS1011 AV " +
                  " INNER JOIN AVS_ACC AA ON AV.CUSTNO = AA.CUSTNO " +
                  " INNER JOIN MASTER M ON AV.CUSTNO=M.CUSTNO " +
                  " WHERE AV.DATEOFUPLOAD BETWEEN '" + DBconn.ConvertDate(FDU) + "' AND '" + DBconn.ConvertDate(TDU) + "' " +
                  " AND AV.Photo_Type BETWEEN '" + FDT + "' AND '" + TDT + "' AND AV.STAGE<>1004 and AV.BRCD='" + BRCD + "'";


            DT = DBconn.GetDatatable(sql);
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
        return(DT);
    }