public static void LoadCost(this DropDownList ddl, int CompanyId)
        {
            DataTable dt = CostCenter.LoadCostCenter();

            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("--select--", "0"));
            if (dt != null)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ddl.Items.Add(new ListItem(item["name"].ToString(), item["id"].ToString()));
                }
            }
        }
Beispiel #2
0
 public HttpResponseMessage GeCostCenter([FromBody] int CompanyId)
 {
     return(Request.CreateResponse(HttpStatusCode.OK, CostCenter.LoadCostCenter()));
 }