Click here to Skip to main content
15,900,907 members

Comments by peer mohammed.A (Top 13 by date)

peer mohammed.A 7-Dec-18 7:33am View    
Ill share my Controller and View below

1.My method in Controller is
if (list.AddFlg == 1)
{
ViewBag.CompAddFlg = true;
}
else
{
ViewBag.CompAddFlg = false;
}
2.My View is



button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" id="btnAddComp" value="Reset"
@{ if (ViewBag.CompAddFlg != true)
{ @:disabled="disabled"
}
}
onclick="clearTextBox();">
Add New Company


peer mohammed.A 7-Dec-18 7:30am View    
Deleted
Ill share my Controller and View below

1.My method in Controller is
public ActionResult List(Company br)
{
try
{
StringBuilder sb = new StringBuilder();
var result = compobj.GetCompany();
if (result == null || result.Value == null)
return Json(new { data = "" }, JsonRequestBehavior.AllowGet);

//Get Role for assinging rights
int roleid = Convert.ToInt16(Session["RoleId"]);
if (roleid != null)
{
var roleoj = roleobj.GetRolebyId(roleid);
var res = roleoj.Value;

foreach (var list in res.RoleDetList)
{
if (list.AddFlg == 1)
{
ViewBag.CompAddFlg = true;
}
else
{
ViewBag.CompAddFlg = false;
}

if (list.MenuId == MenuNumber.MenuCompany && (list.EditFlg == 0 && list.DelFlg == 0))
{
foreach (Company complist in result.Value)
{
sb.AppendFormat("['{0}','{1}','{2}','{3}','{4}','<a id=\" {0} \" onclick=\"return getbyID({0})\" data-toggle=\"modal\" data-target=\".bs-example-modal-sm\" data-id=\"{0}\"><button type=\"button\" class=\"btnSelect btn btn_round btn-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\" disabled=\"disabled\" style=\"width: 20px;padding: 0px;height: 20px;border-radius:10px;\"> <i class=\"fa fa-pencil-square-o\"> <a id=\" {0} \" onclick=\"return Delete({0})\" data-toggle=\"modal\" data-target=\".bs-example-modal-sm\" data-id=\"{0}\"><button type=\"button\" class=\"btnSelect btn btn_round btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Delete\" disabled=\"disabled\" style=\"width: 20px;padding: 0px;height: 20px;border-radius:10px;\"> <i class=\"fa fa-times\"> '],", complist.CompanyId, complist.CompanyName, (complist.Address1 + " , " + complist.Address2 + " , " + complist.Address3), (complist.CityName == "0" ? string.Empty : complist.CityName), complist.IsActive);
}
}
else if (list.MenuId == MenuNumber.MenuCompany && (list.EditFlg == 0 && list.DelFlg == 1))
{
foreach (Company complist in result.Value)
{
sb.AppendFormat("['{0}','{1}','{2}','{3}','{4}','<a id=\" {0} \" onclick=\"return getbyID({0})\" data-toggle=\"modal\" data-target=\".bs-example-modal-sm\" data-id=\"{0}\"><button type=\"button\" class=\"btnSelect btn btn_round btn-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\" disabled=\"disabled\" style=\"width: 20px;padding: 0px;height: 20px;border-radius:10px;\"> <i class=\"fa fa-pencil-square-o\"> <a id=\" {0} \" onclick=\"return Delete({0})\" data-toggle=\"modal\" data-target=\".bs-example-modal-sm\" data-id=\"{0}\"><button type=\"button\" class=\"btnSelect btn btn_round btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Delete\" style=\"width: 20px;padding: 0px;height: 20px;border-radius:10px;\"> <i class=\"fa fa-times\"> '],", complist.CompanyId, complist.CompanyName, (complist.Address1 + " , " + complist.Address2 + " , " + complist.Address3), (complist.CityName == "0" ? string.Empty : complist.CityName), complist.IsActive);
}
}
else if (list.MenuId == MenuNumber.MenuCompany && (list.EditFlg == 1 && list.DelFl
peer mohammed.A 7-Dec-18 7:28am View    
Yes i tried,but it not enable the button...
peer mohammed.A 3-Feb-18 1:23am View    
Deleted
---deleted---
peer mohammed.A 31-Aug-17 1:23am View    
<!DOCTYPE html>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>@ViewBag.Title






<!-- Bootstrap -->

<!-- Font Awesome -->

<!-- NProgress -->


<!-- Custom Theme Style -->












Axon Infosoft




<!-- menu profile quick info -->
@*




Welcome,

John Doe




*@
<!-- /menu profile quick info -->



<!-- sidebar menu -->


@*

General

*@

Master

Home



Company

@*Employee*@
@*@Html.ActionLink("Employee", "Index","Home")*@
@Html.ActionLink("Company Unit", "CompanyUnitIndex", "CompanyUnit")
@Html.ActionLink("Work Division", "WorkDivision", "WorkDivision")
@Html.ActionLink("Store", "StoreUnit", "StoreUnit")
@Html.ActionLink("Store Section", "StoreSection", "StoreSection")
@Html.ActionLink("Department", "DepartmentIndex", "Department")


Interactors

@Html.ActionLink("Agent", "Index", "Agent")
@Html.ActionLink("Buyer", "BuyerIndex", "Buyer")
@Html.ActionLink("Consignee", "ConsigneeIndex", "Consignee")
@Html.ActionLink("Supplier", "SupplierIndex", "Supplier")
@Html.ActionLink("Courier", "CourierIndex", "Courier")
@Html.ActionLink("Bank", "BankIndex", "Bank")


Item

@Html.ActionLink("Item Group", "ItemGroupIndex", "