Ejemplo n.º 1
0
        protected void lv_Adjust_Advances_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            try
            {
                uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");
                uc_SupplyType.BindItems();
                uc_SupplyType.ddlPos_enable = false;
                HiddenField hdnPos = (HiddenField)e.Item.FindControl("hdnPos");
                if (hdnPos.Value != null && hdnPos.Value != "")
                {
                    uc_SupplyType.ddlPos_SelectedValue = hdnPos.Value;
                }


                //supply type
                HiddenField HdnSupply = (HiddenField)e.Item.FindControl("HdnSupply");
                if (HdnSupply.Value != null && HdnSupply.Value != "")
                {
                    uc_SupplyType.ddlSupplyType_SelectedValue = HdnSupply.Value;
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
            }
        }
Ejemplo n.º 2
0
        protected void lv_B2b_Invoice_ItemCreated(object sender, ListViewItemEventArgs e)
        {
            try
            {
                uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");

                uc_SupplyType.BindItems();

                DropDownList ddl_InvoiceType = (DropDownList)e.Item.FindControl("ddl_InvoiceType");
                if (ddl_InvoiceType != null)
                {
                    foreach (EnumConstants.InvoiceType r in Enum.GetValues(typeof(EnumConstants.InvoiceType)))
                    {
                        ListItem item = new ListItem(Enum.GetName(typeof(EnumConstants.InvoiceType), r), Convert.ToByte(r).ToString());
                        ddl_InvoiceType.Items.Add(item);
                    }
                    ddl_InvoiceType.Items.Insert(0, new ListItem(" [ SELECT ]  ", "-1"));
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
            }
        }
Ejemplo n.º 3
0
        protected void lv_crdrRegister_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            try
            {
                if (lv_crdrRegister.EditIndex == (e.Item as ListViewDataItem).DataItemIndex)
                {
                    DataTable dt = new DataTable();
                    dt.Columns.Add(new DataColumn("InvoiceNo"));
                    //dt.Rows.Add("InvoiceNo");
                }

                uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");
                uc_SupplyType.BindItems();
                if (Convert.ToInt32(Session["DisplayIndex"]) != e.Item.DisplayIndex)
                {
                    uc_SupplyType.ddlPos_enable = false;
                }
                else
                {
                    uc_SupplyType.ddlPos_enable = true;
                    Session["DisplayIndex"]     = -1;
                }
                //Place of Supply
                HiddenField hdnPos = (HiddenField)e.Item.FindControl("hdnPos");
                if (hdnPos.Value != null && hdnPos.Value != "")
                {
                    uc_SupplyType.ddlPos_SelectedValue = hdnPos.Value;
                }

                //Supply Type
                HiddenField hdnSupplyType = (HiddenField)e.Item.FindControl("hdnSupplyType");
                if (hdnSupplyType.Value != null && hdnSupplyType.Value != "")
                {
                    uc_SupplyType.ddlSupplyType_SelectedValue = hdnSupplyType.Value;
                }

                // Document type
                DropDownList ddl_DocumentType = (DropDownList)e.Item.FindControl("ddl_DocumentType");
                HiddenField  hdnDoc           = (HiddenField)e.Item.FindControl("hdnDoc");
                if (hdnDoc.Value != null && hdnDoc.Value != "")
                {
                    ddl_DocumentType.Items.FindByValue(hdnDoc.Value).Selected = true;
                }

                // Reason for issuing note
                DropDownList ddl_IssuingNote = (DropDownList)e.Item.FindControl("ddl_IssuingNote");
                HiddenField  hdnIssuingNote  = (HiddenField)e.Item.FindControl("hdnIssuingNote");
                if (hdnIssuingNote.Value != null && hdnIssuingNote.Value != "")
                {
                    ddl_IssuingNote.Items.FindByValue(hdnIssuingNote.Value).Selected = true;
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
            }
        }
Ejemplo n.º 4
0
        protected void lv_B2b_Invoice_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            try
            {
                if (lv_B2b_Invoice.EditIndex == (e.Item as ListViewDataItem).DataItemIndex)
                {
                    DataTable dt = new DataTable();
                    dt.Columns.Add(new DataColumn("InvoiceNo"));
                    //dt.Rows.Add("InvoiceNo");
                }
                //DropDownList ddlPos = (DropDownList)e.Item.FindControl("ddlPos");
                uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");
                uc_SupplyType.BindItems();
                if (Convert.ToInt32(DisplayIndex) != e.Item.DisplayIndex)
                {
                    uc_SupplyType.ddlPos_enable = false;
                }
                else
                {
                    uc_SupplyType.ddlPos_enable = true;
                }


                HiddenField hdnPos = (HiddenField)e.Item.FindControl("hdnPos");
                if (hdnPos.Value != null && hdnPos.Value != "")
                {
                    uc_SupplyType.ddlPos_SelectedValue = hdnPos.Value;
                }
                //ddlPos.Items.FindByValue(hdnPos.Value).Selected = true;

                //supply type
                //DropDownList ddl_SupplyType = (DropDownList)e.Item.FindControl("ddl_SupplyType");
                HiddenField hdnSupplyType = (HiddenField)e.Item.FindControl("hdnSupplyType");
                if (hdnSupplyType.Value != null && hdnSupplyType.Value != "")
                {
                    uc_SupplyType.ddlSupplyType_SelectedValue = hdnSupplyType.Value;
                }
                // ddl_SupplyType.Items.FindByValue(hdnSupplyType.Value).Selected = true;

                //Invoice Type
                DropDownList ddl_InvoiceType = (DropDownList)e.Item.FindControl("ddl_InvoiceType");
                HiddenField  hdnInvoiceType  = (HiddenField)e.Item.FindControl("hdnInvoiceType");
                if (hdnInvoiceType.Value != null && hdnInvoiceType.Value != "")
                {
                    ddl_InvoiceType.Items.FindByValue(hdnInvoiceType.Value).Selected = true;
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
            }
        }
Ejemplo n.º 5
0
 protected void lv_Tax_Liability_ItemCreated(object sender, ListViewItemEventArgs e)
 {
     try
     {
         uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");
         uc_SupplyType.BindItems();
     }
     catch (Exception ex)
     {
         cls_ErrorLog ob = new cls_ErrorLog();
         cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
     }
 }
Ejemplo n.º 6
0
        protected void lv_crdrRegister_ItemCreated(object sender, ListViewItemEventArgs e)
        {
            try
            {
                uc_SupplyType uc_SupplyType = (uc_SupplyType)e.Item.FindControl("uc_SupplyType");

                uc_SupplyType.BindItems();

                // Document Type
                DropDownList ddl_DocumentType = (DropDownList)e.Item.FindControl("ddl_DocumentType");
                if (ddl_DocumentType != null)
                {
                    foreach (EnumConstants.NoteType r in Enum.GetValues(typeof(EnumConstants.NoteType)))
                    {
                        ddl_DocumentType.Items.Add(new ListItem(Enum.GetName(typeof(EnumConstants.NoteType), r), Convert.ToString(r).ToString()));
                    }
                    ddl_DocumentType.Items.Insert(0, new ListItem(" [SELECT] ", "-1"));
                }

                // Reason for issuing note
                DropDownList ddl_IssuingNote = (DropDownList)e.Item.FindControl("ddl_IssuingNote");
                if (ddl_IssuingNote != null)
                {
                    var data = unitOfwork.OfflineissuingnoteRepository.All().ToList();
                    data.Insert(0, new GST_TRN_OFFLINE_ISSUINGNOTE_REASON {
                        IssuingNoteName = "[ SELECT ]", NoteID = -1
                    });
                    ddl_IssuingNote.DataSource     = data;
                    ddl_IssuingNote.DataTextField  = "IssuingNoteName";
                    ddl_IssuingNote.DataValueField = "NoteID";
                    ddl_IssuingNote.DataBind();
                }
            }
            catch (Exception ex)
            {
                cls_ErrorLog ob = new cls_ErrorLog();
                cls_ErrorLog.LogError(ex, Common.LoggedInUserID());
            }
        }