Ejemplo n.º 1
0
        public string GetNetworkpath(string drivename)
        {
            objmst = new MasterData();
            DataTable dt = new DataTable();
            dt = objmst.GetLookupList("folderpath");

            if (dt.Rows.Count > 1)
            {
                dt = dt.Select("lkup_desc like '" + drivename + "%'").CopyToDataTable();
            }

            return dt.Rows[0]["lkup_desc"].ToString().Split('|').GetValue(1).ToString();
        }
Ejemplo n.º 2
0
        public void grdfill()
        {
            try
            {

                string id = this.ID;
                vslist.ValidationGroup = id;

                switch (id)
                {

                    case "lst_scheduletype":
                        group = "scheduletype";

                        break;
                    case "lst_pricescalestatus":
                        group = "pricescalestatus";

                        break;
                    case "lst_contractstatus":
                        group = "contractstatus";
                        break;
                    case "lst_offerstatus":
                        group = "offerstatus";
                        break;
                    case "lst_expensestatus":
                        group = "expensestatus";
                        break;
                    case "lst_memostatus":
                        group = "memostatus";
                        break;
                    case "lst_engagementstatus":
                        group = "engagementstatus";
                        break;
                    case "lst_employeetype":
                        group = "employeetype";
                        break;
                    case "lst_employeestatus":
                        group = "employeestatus";
                        break;
                    case "lst_Dealothers":
                        group = "DealOthers";
                        break;
                    case "lst_LocalOthers":
                        group = "localdocumentedothers";
                        break;
                    //case "lst_DocumentOthers":
                    //    group = "localdocumentedothers";
                    //    break;
                }

                dtlookup.Clear();
                dtlookup = new DataTable();
                objData = new MasterData();
                dtlookup = objData.GetLookupList(group);
                if (dtlookup.Rows.Count > 0)
                {
                    grdLookup.DataSource = dtlookup;
                    grdLookup.DataBind();

                }
                else
                {
                    foreach (DataColumn cl in dtlookup.Columns)
                    {
                        cl.AllowDBNull = true;
                    }
                    dtlookup.Rows.Add(dtlookup.NewRow());
                    grdLookup.DataSource = dtlookup;
                    grdLookup.DataBind();
                    int columncount = grdLookup.Rows[0].Cells.Count;
                    grdLookup.Rows[0].Cells.Clear();
                    grdLookup.Rows[0].Cells.Add(new TableCell());
                    grdLookup.Rows[0].Cells[0].ColumnSpan = columncount - 2;
                    grdLookup.Rows[0].Cells[0].Text = "No Records Found";
                    grdLookup.Columns[columncount - 2].Visible = false;
                }

                DropDownList ddltype = grdLookup.FooterRow.FindControl("ddllkup_group") as DropDownList;
                switchddl(ddltype);
                //<asp:ListItem Value="scheduletype|30" Text="Engagement Schedule Type"></asp:ListItem>
                //               <asp:ListItem Value="pricescalestatus|10" Text="Engagement Pricescale Status"></asp:ListItem>
                //               <asp:ListItem Value="contractstatus|10" Text="Engagement Contract Status"></asp:ListItem>
                //               <asp:ListItem Value="offerstatus|10" Text="Engagement Offer Status"></asp:ListItem>
                //               <asp:ListItem Value="expensestatus|15" Text="Engagement Expense Status"></asp:ListItem>
                //               <asp:ListItem Value="memostatus|10" Text="Engagement Memo Status"></asp:ListItem>
                //               <asp:ListItem Value="engagementstatus|10" Text="Engagement Engagement Status"></asp:ListItem>

                grdLookup.FooterRow.Visible = true;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
 protected void RepDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
     TextInfo textInfo = cultureInfo.TextInfo;
     if (e.Item.ItemType == ListItemType.Footer)
     {
         MasterData objmst = new MasterData();
         ddlscheduletype.DataSource = objmst.GetLookupList("scheduletype");
         ddlscheduletype.DataTextField = "lkup_desc";
         ddlscheduletype.DataBind();
         int CurrentIndex = ddlscheduletype.Items.IndexOf(ddlscheduletype.Items.FindByText(hdfPerf.Value));
         ddlscheduletype.Items.Insert(0, new ListItem { Value = "0", Text = "--Select--", Selected = true });
         if ((CurrentIndex + 2) != ddlscheduletype.Items.Count)
         {
             ddlscheduletype.SelectedIndex = CurrentIndex + 2;
         }
         string schdate = System.DateTime.Now.ToString("MM/dd/yyyy");
         if (!string.IsNullOrEmpty(hdn_schnextdate.Value))
         {
             schdate = Convert.ToDateTime(hdn_schnextdate.Value, CultureInfo.CurrentUICulture.DateTimeFormat).AddDays(1).ToString("MM/dd/yyyy");
         }
         txtscheduedate.Text = schdate;
         lblscheduleday.Text = textInfo.ToTitleCase(Convert.ToDateTime(txtscheduedate.Text, CultureInfo.CurrentUICulture.DateTimeFormat).DayOfWeek.ToString().Substring(0, 3));
     }
 }
 protected void RepDetails_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.ToLower() == "cancel")
     {
         bindScheduleDetails(engagementid);
     }
     if (e.CommandName.ToLower() == "edit")
     {
         e.Item.FindControl("tredit").Visible = true;
         DropDownList ddlscheduletypeE = (DropDownList)e.Item.FindControl("ddlscheduletypeE");
         HiddenField hdnscheduletypeE = (HiddenField)e.Item.FindControl("hdnscheduletypeE");
         MasterData objmst = new MasterData();
         ddlscheduletypeE.DataSource = objmst.GetLookupList("scheduletype");
         ddlscheduletypeE.DataTextField = "lkup_desc";
         ddlscheduletypeE.DataBind();
         ddlscheduletypeE.SelectedIndex = ddlscheduletypeE.Items.IndexOf(ddlscheduletypeE.Items.FindByText(hdnscheduletypeE.Value));
         e.Item.FindControl("tr_crow").Visible = false;
     }
     if (e.CommandName.ToLower() == "update")
     {
         UpdateSchedule(e.Item);
     }
     trfooter.Visible = false;
 }
Ejemplo n.º 5
0
 protected void fillemployeetype()
 {
     MasterData objmsd = new MasterData();
     DataTable dt = new DataTable();
     dt = objmsd.GetLookupList("employeetype");
     objcf.Fillddl_noselect(ddlemployeetype, dt, "lkup_desc", "lkup_id");
     dt = objmsd.GetLookupList("employeestatus");
     objcf.Fillddl_noselect(ddlemployeestatus, dt, "lkup_desc", "lkup_id");
     string def_status = "";
     if (dt.Select("lkup_desc='active'").Length > 0)
     {
         def_status = dt.Select("lkup_desc='active'").CopyToDataTable().Rows[0]["lkup_desc"].ToString();
     }
     ddlemployeestatus.SelectedIndex = ddlemployeestatus.Items.IndexOf(ddlemployeestatus.Items.FindByText(def_status));
 }