Example #1
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlProduct.Items.Add(new ListItem("Select Product", "0"));
        ddlRawMaterial.Items.Add(new ListItem("Select RawMaterial", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());


            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }


            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 2)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlRawMaterial.Items.Add(item);
            }
        }
    }
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlProduct.Items.Add(new ListItem("Any Product", "0"));
        ddlWorkStation.Items.Add(new ListItem("Select WorkStation", "0"));
        ddlRefference.Items.Add(new ListItem("Select Ref", "0"));
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());


            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 7) // share holder
            {
                item = new ListItem("00-" + aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlRefference.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1
                &&
                (
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Head")
                    ||
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show")
                )
                )
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStation.Items.Add(item);
            }
        }

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 4
                &&
                aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("H1")
                ) //Head Office
            {
                ListItem item = new ListItem();
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlRefference.Items.Add(item);
            }
        }


        //if (int.Parse(Request.QueryString["TransactionTypeID"]) == 0)
        //{

        // UpdatePanel2.Visible = false;
        //}
    }
Example #3
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlEmployee.Items.Add(new ListItem("Select Employee", "0"));
        ddlWorkSatation.Items.Add(new ListItem("Select WorkStation", "0"));
        ddlProductAll.Items.Add(new ListItem("Select Product", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 4)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlEmployee.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkSatation.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProductAll.Items.Add(item);
            }
        }
    }
Example #4
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlACC_ChartOfAccountLabel4.Items.Add(new ListItem("-- Any Supplier --", "0"));
        ddlWorkStationID.Items.Add(new ListItem("-- Any Workstation --", "0"));
        ddlWorkStationForTransactionReport.Items.Add(new ListItem("-- Any Workstation --", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlACC_ChartOfAccountLabel4.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStationID.Items.Add(item);
                ddlWorkStationForTransactionReport.Items.Add(item);
            }
        }
    }
Example #5
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlReference.Items.Add(new ListItem("Select Referrence", "0"));
        ddlBranch.Items.Add(new ListItem("Select Branch", "0"));
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 4)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlReference.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1 && aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show"))
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlBranch.Items.Add(item);
            }
        }
    }
Example #6
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlProduct.Items.Add(new ListItem("Any Product", "0"));
        ddlWorkStation.Items.Add(new ListItem("Select ShowRoom", "0"));
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1 && aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Room"))
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStation.Items.Add(item);
            }
        }
    }
Example #7
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlACC_ChartOfAccountLabel4.Items.Add(new ListItem("All Supplier", "0"));
        ddlWorkStationForTransactionReport.Items.Add(new ListItem("All Workstation", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlACC_ChartOfAccountLabel4.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStationForTransactionReport.Items.Add(item);
            }
        }
        try
        {
            ddlWorkStationForTransactionReport.SelectedValue = getLogin().ExtraField5;
        }
        catch (Exception ex)
        { }
    }
Example #8
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlACC_ChartOfAccountLabel4.Items.Add(new ListItem("All Supplier", "0"));
        ddlWorkStationForTransactionReport.Items.Add(new ListItem("All Workstation", "0"));
        ddlSalesMan.Items.Add(new ListItem("All Salesman", "0"));
        ddlProduct.Items.Add(new ListItem("All Product-->", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlACC_ChartOfAccountLabel4.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 4)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlSalesMan.Items.Add(item);
            }


            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1

                /*&&
                 * (
                 * aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Head")
                 ||
                 ||aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show")
                 ||)*/
                )
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStationForTransactionReport.Items.Add(item);
            }
        }
    }
    private void loadACC_ChartOfAccountLabel4()
    {
        ddlAllACC_ChartOfAccountLabel4.Items.Add(new ListItem("Select", "0"));
        List<ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List<ACC_ChartOfAccountLabel4>();
        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        List<ACC_HeadType> allACC_HeadType= ACC_HeadTypeManager.GetAllACC_HeadTypes();
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            /*
             ACC_HeadTypeID	HeadTypeName
1	Work Station
2	Raw Materials
3	Products
4	Employee
5	Bank Account
6	Supplier
7	ShareHolder
8	Others
             */
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1 ||
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 4 ||
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 5 ||
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6 ||
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 8
                )
            {
                foreach (ACC_HeadType aCC_HeadType in allACC_HeadType)
                {
                    if (aCC_HeadType.ACC_HeadTypeID == aCC_ChartOfAccountLabel4.ACC_HeadTypeID)
                    {
                        aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text = aCC_HeadType.HeadTypeName+" -> "+ aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text; 
                    }
                }

                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlAllACC_ChartOfAccountLabel4.Items.Add(item);

                
            }

            
        }
    }
Example #10
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlSuppier.Items.Add(new ListItem("Select Supplier", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlSuppier.Items.Add(item);
            }
        }
    }
Example #11
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlShowRoom.Items.Add(new ListItem("All Show Room", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if ((aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID == 1 || aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToLower().Contains("show room")) &&
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlShowRoom.Items.Add(item);
            }
        }
    }
Example #12
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlSuppier.Items.Add(new ListItem("Select Supplier", "0"));
        ddlProduct.Items.Add(new ListItem("Any Product", "0"));

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 2 || //2=fabric
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 9 ||//9=accessories(productive)
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 10)   //10=accessories(non productive)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                if (aCC_ChartOfAccountLabel4.ExtraField1 != "")
                {
                    ddlRawMaterialAll.Items.Add(item);
                }
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlSuppier.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }
        }

        rbtnlRawmaterialsType_SelectedIndexChanged(this, new EventArgs());
    }
Example #13
0
    protected void btnLoadNewlyAddedRawmaterials_Click(object sender, EventArgs e)
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 2 || //2=fabric
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 9 ||//9=accessories(productive)
                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 10)   //10=accessories(non productive)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                if (aCC_ChartOfAccountLabel4.ExtraField1 != "")
                {
                    ddlRawMaterialAll.Items.Add(item);
                }
            }
        }

        rbtnlRawmaterialsType_SelectedIndexChanged(this, new EventArgs());
    }
Example #14
0
    private void loadACC_ChartOfAccountLabel4()
    {
        #region Bank balance
        string sql = @"select SUM(Debit)- SUM(Credit) as Balance
                        ,ACC_ChartOfAccountLabel4.ChartOfAccountLabel4Text
                        ,ACC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID
                        ,ACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID
                        ,ACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text
                        from ACC_JournalDetail 
                        inner join ACC_ChartOfAccountLabel4 on ACC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID
                        =ACC_JournalDetail.ACC_ChartOfAccountLabel4ID
                        inner join ACC_ChartOfAccountLabel3 on ACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID
                        = ACC_JournalDetail.ACC_ChartOfAccountLabel3ID
                        inner join ACC_JournalMaster 
                        on ACC_JournalDetail.JournalMasterID =ACC_JournalMaster.ACC_JournalMasterID
                        where ACC_JournalDetail.ACC_ChartOfAccountLabel3ID in (1,3)
                        and ACC_JournalMaster.RowStatusID=1
                        group by 
                        ACC_ChartOfAccountLabel4.ChartOfAccountLabel4Text
                        ,ACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text
                        ,ACC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID
                        ,ACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID
                        order by ACC_ChartOfAccountLabel3ID,ChartOfAccountLabel4Text";

        DataSet ds = CommonManager.SQLExec(sql);

        #endregion


        ddlAllACC_ChartOfAccountLabel4.Items.Add(new ListItem("Select", "0"));
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s         = new List <ACC_ChartOfAccountLabel4>();
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4sSupplier = new List <ACC_ChartOfAccountLabel4>();
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4sBanks    = new List <ACC_ChartOfAccountLabel4>();
        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        List <ACC_HeadType> allACC_HeadType = ACC_HeadTypeManager.GetAllACC_HeadTypes();
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            /*
             * ACC_HeadTypeID	HeadTypeName
             *  1	Work Station
             *  2	Raw Materials
             *  3	Products
             *  4	Employee
             *  5	Bank Account
             *  6	Supplier
             *  7	ShareHolder
             *  8	Others
             */
            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 6)
            {
                aCC_ChartOfAccountLabel4sSupplier.Add(aCC_ChartOfAccountLabel4);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 5)
            {
                aCC_ChartOfAccountLabel4sBanks.Add(aCC_ChartOfAccountLabel4);
            }
        }


        gvACC_ChartOfAccountLabel4.DataSource = aCC_ChartOfAccountLabel4sBanks;
        gvACC_ChartOfAccountLabel4.DataBind();


        foreach (GridViewRow gvr in gvACC_ChartOfAccountLabel4.Rows)
        {
            DropDownList ddlBanks    = (DropDownList)gvr.FindControl("ddlBanks");
            DropDownList ddlSupplier = (DropDownList)gvr.FindControl("ddlSupplier");
            Label        lblChartOfAccountLabel4Text = (Label)gvr.FindControl("lblChartOfAccountLabel4Text");
            HiddenField  hfChartOfAccountLabel4ID    = (HiddenField)gvr.FindControl("hfChartOfAccountLabel4ID");
            ddlBanks.Items.Add(new ListItem("select bank acc", "0"));
            TextBox txtOpiningBalance = (TextBox)gvr.FindControl("txtOpiningBalance");
            TextBox txtCheckDate      = (TextBox)gvr.FindControl("txtCheckDate");
            txtCheckDate.Text = DateTime.Today.ToString("dd MMM yyyy");

            //lblChartOfAccountLabel4Text.Text = lblChartOfAccountLabel4Text.Text.Split('>')[1];
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (dr["ACC_ChartOfAccountLabel4ID"].ToString() == hfChartOfAccountLabel4ID.Value)
                {
                    txtOpiningBalance.Text = dr["Balance"].ToString();
                    break;
                }
            }

            foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4sBanks)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlBanks.Items.Add(item);
            }

            foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4sSupplier)
            {
                ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlSupplier.Items.Add(item);
            }
        }
    }
Example #15
0
    private void loadData()
    {
        try
        {
            ACC_JournalMaster journalMaster = ACC_JournalMasterManager.GetACC_JournalMasterByID(int.Parse(Request.QueryString["JournalMasterID"]));


            List <ACC_JournalDetail> journalDetails = ACC_JournalDetailManager.GetAllACC_JournalDetailByJournalMasterID(int.Parse(Request.QueryString["JournalMasterID"]));

            string journalDetailsHTML = @"<table id='tblJournalDetails' class='tdBorder' border='0' cellspacing='0' cellpadding='0' style='margin:20px 0;'>
                    <tr style='font-weight:bold;font-size:15px;'>
                        <td width='100px'>
                            Account Code
                        </td>
                        <td width='487px'>
                            Account Title
                        </td>
                        <td width='80px'>
                            Debit
                        </td>
                        <td width='80px'>
                            Credit
                        </td>
                    </tr>";

            decimal totalDebit  = 0;
            decimal totalCredit = 0;
            trAddress.Visible = false;
            trCheck.Visible   = false;
            bool defaultJournal = false;

            switch (journalMaster.JournalMasterName)
            {
            case "1":    //Receipt Voucher
                lblVoucherName.Text         = "RECEIPT";
                lblVoucherType.Text         = "RV";
                lblReceivedfromOrPayto.Text = "Received from";
                trAddress.Visible           = true;
                trCheck.Visible             = true;
                //generate table

                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    try
                    {
                        if (journalDetail.Credit == 0)
                        {
                            journalDetailsHTML += @"<tr>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Code + @"
                                    </td>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Text + " - " + journalDetail.ACC_ChartOfAccountLabel4Text + " (" + journalDetail.WorkStationName + @")
                                    </td>
                                    <td style='text-align:right;'>
                                        " + journalDetail.Debit.ToString("0,0.00") + @"
                                    </td>
                                    <td style='text-align:right;'>
                                       " + journalDetail.Credit.ToString("0,0.00") + @"
                                    </td>
                                </tr>";
                            totalCredit        += journalDetail.Credit;
                            totalDebit         += journalDetail.Debit;
                        }
                    }
                    catch (Exception ex) { }
                }

                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    try
                    {
                        if (journalDetail.Credit != 0)
                        {
                            journalDetailsHTML += @"<tr>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Code + @"
                                    </td>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Text + " - " + journalDetail.ACC_ChartOfAccountLabel4Text + " (" + journalDetail.WorkStationName + @")
                                    </td>
                                    <td style='text-align:right;'>
                                        " + journalDetail.Debit.ToString("0,0.00") + @"
                                    </td>
                                    <td style='text-align:right;'>
                                       " + journalDetail.Credit.ToString("0,0.00") + @"
                                    </td>
                                </tr>";
                            totalCredit        += journalDetail.Credit;
                            totalDebit         += journalDetail.Debit;
                        }
                    }
                    catch (Exception ex) { }
                }

                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    if (journalDetail.Credit == 0)
                    {
                        lblChequeDate.Text = journalDetail.ExtraField1;
                        lblChequeNo.Text   = journalDetail.ExtraField3;
                        try
                        {
                            lblChequeBank.Text = journalDetail.ExtraField2.Split(',')[1];
                        }
                        catch (Exception ex) { }
                        try
                        {
                            lblChequeBranch.Text = journalDetail.ExtraField2.Split(',')[0];
                        }
                        catch (Exception ex) { }
                        break;
                    }
                }

                lblJournalDetials.Text = journalDetailsHTML + "<tr><td></td><td><b>Total:</b></td><td style='text-align:right;'>" + totalDebit.ToString("0,0.00") + "</td><td style='text-align:right;'>" + totalCredit.ToString("0,0.00") + "</td></tr><tr><td  colspan='4'><b>Taka in words:</b> " + NumberToWords(int.Parse(totalCredit.ToString("0"))) + " taka only.</td></tr></table>";

                break;

            case "2":    //Payment Voucher
                lblVoucherName.Text         = "PAYMENT";
                lblVoucherType.Text         = "PV";
                lblReceivedfromOrPayto.Text = "Pay To";
                trAddress.Visible           = true;
                trCheck.Visible             = true;
                //generate table


                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    try
                    {
                        if (journalDetail.Credit == 0)
                        {
                            journalDetailsHTML += @"<tr>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Code + @"
                                    </td>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Text + " - " + journalDetail.ACC_ChartOfAccountLabel4Text + " (" + journalDetail.WorkStationName + @")
                                    </td>
                                    <td style='text-align:right;'>
                                        " + journalDetail.Debit.ToString("0,0.00") + @"
                                    </td>
                                    <td style='text-align:right;'>
                                       " + journalDetail.Credit.ToString("0,0.00") + @"
                                    </td>
                                </tr>";
                            totalCredit        += journalDetail.Credit;
                            totalDebit         += journalDetail.Debit;
                        }
                    }
                    catch (Exception ex) { }
                }

                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    try
                    {
                        if (journalDetail.Credit != 0)
                        {
                            journalDetailsHTML += @"<tr>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Code + @"
                                    </td>
                                    <td>
                                        " + journalDetail.ACC_ChartOfAccountLabel3Text + " - " + journalDetail.ACC_ChartOfAccountLabel4Text + " (" + journalDetail.WorkStationName + @")
                                    </td>
                                    <td style='text-align:right;'>
                                        " + journalDetail.Debit.ToString("0,0.00") + @"
                                    </td>
                                    <td style='text-align:right;'>
                                       " + journalDetail.Credit.ToString("0,0.00") + @"
                                    </td>
                                </tr>";
                            totalCredit        += journalDetail.Credit;
                            totalDebit         += journalDetail.Debit;
                        }
                    }
                    catch (Exception ex) { }
                }

                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    if (journalDetail.Debit == 0)
                    {
                        lblChequeDate.Text = journalDetail.ExtraField1;
                        lblChequeNo.Text   = journalDetail.ExtraField3;
                        try
                        {
                            lblChequeBank.Text = journalDetail.ExtraField2.Split(',')[1];
                        }
                        catch (Exception ex) { }
                        try
                        {
                            lblChequeBranch.Text = journalDetail.ExtraField2.Split(',')[0];
                        }
                        catch (Exception ex) { }
                        break;
                    }
                }

                lblJournalDetials.Text = journalDetailsHTML + "<tr><td></td><td><b>Total:</b></td><td style='text-align:right;'>" + totalDebit.ToString("0,0.00") + "</td><td style='text-align:right;'>" + totalCredit.ToString("0,0.00") + "</td></tr><tr><td  colspan='4'><b>Taka in words:</b> " + NumberToWords(int.Parse(totalDebit.ToString("0"))) + " taka only.</td></tr></table>";

                break;

            case "3":    //Journal Voucher
                lblVoucherName.Text = "JOURNAL";
                lblVoucherType.Text = "JV";
                defaultJournal      = true;

                break;

            case "4":    //Contra Voucher
                lblVoucherName.Text = "CONTRA";
                lblVoucherType.Text = "CV";
                trCheck.Visible     = true;
                defaultJournal      = true;
                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    if (journalDetail.ExtraField3 != "")
                    {
                        lblChequeDate.Text = journalDetail.ExtraField1;
                        lblChequeNo.Text   = journalDetail.ExtraField3;
                        try
                        {
                            lblChequeBank.Text = journalDetail.ExtraField2.Split(',')[1];
                        }
                        catch (Exception ex) { }
                        try
                        {
                            lblChequeBranch.Text = journalDetail.ExtraField2.Split(',')[0];
                        }
                        catch (Exception ex) { }
                        break;
                    }
                }
                break;

            default:
                break;
            }

            if (defaultJournal)
            {
                foreach (ACC_JournalDetail journalDetail in journalDetails)
                {
                    try
                    {
                        journalDetailsHTML += @"<tr>
                                <td>
                                    " + journalDetail.ACC_ChartOfAccountLabel3Code + @"
                                </td>
                                <td>
                                    " + journalDetail.ACC_ChartOfAccountLabel3Text + " - " + journalDetail.ACC_ChartOfAccountLabel4Text + " (" + journalDetail.WorkStationName + @")
                                </td>
                                <td style='text-align:right;'>
                                    " + journalDetail.Debit.ToString("0,0.00") + @"
                                </td>
                                <td style='text-align:right;'>
                                    " + journalDetail.Credit.ToString("0,0.00") + @"
                                </td>
                            </tr>";
                        totalCredit        += journalDetail.Credit;
                        totalDebit         += journalDetail.Debit;
                    }
                    catch (Exception ex) { }
                }


                lblJournalDetials.Text = journalDetailsHTML + "<tr><td></td><td><b>Total:</b></td><td style='text-align:right;'>" + totalDebit.ToString("0,0.00") + "</td><td style='text-align:right;'>" + totalCredit.ToString("0,0.00") + "</td></tr><tr><td  colspan='4'><b>Taka in words:</b> " + NumberToWords(int.Parse(totalCredit.ToString("0"))) + " taka only.</td></tr></table>";
            }

            lblOfficeName.Text      = journalDetails[0].WorkStationName;
            lblJournalMasterID.Text = Request.QueryString["JournalMasterID"];

            if (journalMaster.RowStatusID != 1)
            {
                lblJournalMasterID.BackColor = System.Drawing.Color.Red;
            }

            lblDate.Text         = journalMaster.JournalDate.ToString("dd MMM yyyy");
            lblCustomerName.Text = journalMaster.ExtraField1;
            lblAddress.Text      = journalMaster.ExtraField2;
            if (journalMaster.Note.Contains("Inventory Purchase-"))
            {
                lblExplanation.Text = "<a href='../Inventory/PurchasePrint.aspx?PurchaseID=" + journalMaster.Note.Replace("Inventory Purchase-", "") + "' target='_blank'>" + journalMaster.Note + "</a>";
            }
            else
            {
                lblExplanation.Text = journalMaster.Note;
            }

            gvJournal.DataSource = journalDetails;
            gvJournal.DataBind();

            List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();
            aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

            DataSet ds = CommonManager.SQLExec(
                @"
SELECT
ACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text +'('+ ACC_ChartOfAccountLabel2.ChartOfAccountLabel2Text +')('+ 
                       ACC_ChartOfAccountLabel1.ChartOfAccountLabel1Text+')' as Head,
ACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel3ID
FROM         ACC_ChartOfAccountLabel1 INNER JOIN
                      ACC_ChartOfAccountLabel2 ON 
                      ACC_ChartOfAccountLabel1.ACC_ChartOfAccountLabel1ID = ACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel1ID INNER JOIN
                      ACC_ChartOfAccountLabel3 ON ACC_ChartOfAccountLabel2.ACC_ChartOfAccountLabel2ID = ACC_ChartOfAccountLabel3.ACC_ChartOfAccountLabel2ID
where ACC_ChartOfAccountLabel3.RowStatusID=1
order by ACC_ChartOfAccountLabel1.ChartOfAccountLabel1Text,ACC_ChartOfAccountLabel2.ChartOfAccountLabel2Text,ACC_ChartOfAccountLabel3.ChartOfAccountLabel3Text
"
                );
            ddlL4.Items.Clear();
            ddlL3.Items.Clear();
            ddlWorkStation.Items.Clear();
            ddlL4.Items.Add(new ListItem("N/A", "0"));
            ddlL3.Items.Add(new ListItem("N/A", "0"));
            ddlWorkStation.Items.Add(new ListItem("N/A", "0"));
            foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
            {
                ddlL4.Items.Add(new ListItem(
                                    (
                                        aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 9
                ? "Access(Prod)" :
                                        (
                                            aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 10
                ? "Access (Non-Prod)" :
                                            (
                                                aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 2
                ? "Fabrics" :
                                                (
                                                    aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3
                ? "Product" : aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString()
                                                )

                                            )
                                        )
                                    )
                                    + "-" + aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString()));
                if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
                {
                    ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                    ddlWorkStation.Items.Add(item);
                }
            }
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                ddlL3.Items.Add(new ListItem(dr["Head"].ToString(), dr["ACC_ChartOfAccountLabel3ID"].ToString()));
            }

            /*
             * //List<ACC_ChartOfAccountLabel3> aCC_ChartOfAccountLabel3s = new List<ACC_ChartOfAccountLabel3>();
             * //aCC_ChartOfAccountLabel3s = ACC_ChartOfAccountLabel3Manager.GetAllACC_ChartOfAccountLabel3sForJournalEntryForDropDownList();
             *
             * foreach (GridViewRow gvr in gvJournal.Rows)
             * {
             *  HiddenField hfWorkStationID = (HiddenField)gvr.FindControl("hfWorkStationID");
             *  HiddenField hfACC_ChartOfAccountLabel4ID = (HiddenField)gvr.FindControl("hfACC_ChartOfAccountLabel4ID");
             *  HiddenField hfACC_ChartOfAccountLabel3ID = (HiddenField)gvr.FindControl("hfACC_ChartOfAccountLabel3ID");
             *  DropDownList ddlWorkStation = (DropDownList)gvr.FindControl("ddlWorkStation");
             *  DropDownList ddlL3 = (DropDownList)gvr.FindControl("ddlL3");
             *  DropDownList ddlL4 = (DropDownList)gvr.FindControl("ddlL4");
             *  foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
             *  {
             *      ddlL4.Items.Add(new ListItem(
             *          (
             *          aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 9
             *      ? "Access(Prod)" :
             *      (
             *      aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 10
             *      ? "Access (Non-Prod)" :
             *      (
             *      aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 2
             *      ? "Fabrics" : aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString()
             *      )
             *      )
             *          )
             + "-" + aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString()));
             +      if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1)
             +      {
             +          ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
             +          ddlWorkStation.Items.Add(item);
             +      }
             +  }
             +  foreach (DataRow dr in ds.Tables[0].Rows)
             +  {
             +      ddlL3.Items.Add(new ListItem(dr["Head"].ToString(), dr["ACC_ChartOfAccountLabel3ID"].ToString()));
             +  }
             +
             +  ddlL4.SelectedValue = hfACC_ChartOfAccountLabel4ID.Value;
             +  ddlL3.SelectedValue = hfACC_ChartOfAccountLabel3ID.Value;
             +  ddlWorkStation.SelectedValue = hfWorkStationID.Value;
             + }
             */
        }
        catch (Exception ex)
        { }
    }
Example #16
0
    private void loadACC_ChartOfAccountLabel4()
    {
        List <ACC_ChartOfAccountLabel4> aCC_ChartOfAccountLabel4s = new List <ACC_ChartOfAccountLabel4>();

        aCC_ChartOfAccountLabel4s = ACC_ChartOfAccountLabel4Manager.GetAllACC_ChartOfAccountLabel4sForJournalEntry();

        ddlProduct.Items.Add(new ListItem("Any Product", "0"));
        ddlWorkStation.Items.Add(new ListItem("Select WorkStation", "0"));
        foreach (ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 in aCC_ChartOfAccountLabel4s)
        {
            ListItem item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString() + "@" + aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 3)
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlProduct.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1
                &&
                (
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Head")
                    ||
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show")
                )
                )
            {
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStation.Items.Add(item);
            }

            if (aCC_ChartOfAccountLabel4.ACC_HeadTypeID == 1
                &&
                (
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Head")
                    ||
                    aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show")
                )
                )
            {
                //if (aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.Contains("Show"))
                //{
                item = new ListItem(aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text.ToString(), aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID.ToString());
                ddlWorkStationSearch.Items.Add(item);
                //}
            }
        }

        if (int.Parse(Request.QueryString["TransactionTypeID"]) != 0)
        {
            if (getLogin().ExtraField5 != "1")
            {
                ddlWorkStationSearch.SelectedValue = getLogin().ExtraField5;
                ddlWorkStationSearch.Enabled       = false;
            }
            else
            {
                ddlWorkStationSearch.Enabled = true;
            }
        }
        else
        {
            ddlWorkStationSearch.Enabled = true;
            UpdatePanel2.Visible         = false;
        }
    }