Exemple #1
0
        protected void grdAccoMaps_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            List <MDMSVC.DC_Accomodation_ProductMapping> RQ = new List <MDMSVC.DC_Accomodation_ProductMapping>();

            if (e.CommandName == "UnMap")
            {
                Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString());

                GridViewRow row   = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                int         index = row.RowIndex;
                if (myRow_Id != null)
                {
                    Guid Accommodation_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[1].ToString());
                    MDMSVC.DC_Accomodation_ProductMapping newObj = new MDMSVC.DC_Accomodation_ProductMapping
                    {
                        Accommodation_ProductMapping_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[0].ToString()),
                        Accommodation_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[1].ToString()),
                        Status           = "UNMAPPED",
                        IsActive         = true,
                        Edit_Date        = DateTime.Now,
                        Edit_User        = System.Web.HttpContext.Current.User.Identity.Name
                    };
                    RQ.Add(newObj);
                    if (MapSvc.UpdateProductMappingData(RQ))
                    {
                        divMsgForMapping.Style.Add("display", "none");
                        divMsgForUnMapping.Style.Add("display", "block");
                        BootstrapAlert.BootstrapAlertMessage(divMsgForUnMapping, "Record unmapped successfully", BootstrapAlertType.Success);
                        fillAPMrequestobject(Accommodation_Id, 0, "manual");
                        fillmappeddata(Accommodation_Id, 0);
                    }
                }
            }
        }
        protected void frmSupplierdetail_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            MDMSVC.DC_Message _msg = new MDMSVC.DC_Message();
            TextBox           txtSupplierNameCreate = (TextBox)frmSupplierdetail.FindControl("txtSupplierNameCreate");
            TextBox           txtSupplierCodeCreate = (TextBox)frmSupplierdetail.FindControl("txtSupplierCodeCreate");
            DropDownList      ddlSupplierTypeCreate = (DropDownList)frmSupplierdetail.FindControl("ddlSupplierTypeCreate");
            DropDownList      ddlStatusCreate       = (DropDownList)frmSupplierdetail.FindControl("ddlStatusCreate");

            if (e.CommandName == "Add")
            {
                string strSupplierType = Convert.ToString(ddlSupplierTypeCreate.SelectedItem.Text.Trim());
                string strStatus       = Convert.ToString(ddlStatusCreate.SelectedItem.Text.Trim());

                _msg = _objMaster.AddUpdateSupplier(new MDMSVC.DC_Supplier()
                {
                    Name         = txtSupplierNameCreate.Text.Trim(),
                    Code         = txtSupplierCodeCreate.Text.Trim(),
                    SupplierType = strSupplierType,
                    StatusCode   = strStatus,
                    Create_Date  = DateTime.Now,
                    Create_User  = System.Web.HttpContext.Current.User.Identity.Name
                });
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierdetail.DataBind();
                    hdnFlag.Value = "true";
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success);
                }
                else
                {
                    hdnFlag.Value = "false";
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
        }
Exemple #3
0
        protected void btnChangeActivityStatus_Click(object sender, EventArgs e)
        {
            try
            {
                Guid Activity_Flavour_Id = new Guid(Request.QueryString["Activity_Flavour_Id"]);
                if (ddlActivity_Flavour_Status.SelectedItem.Text == "Review Completed" && !ValidateControl())
                {
                    return;
                }

                var result = activitySVC.AddUpdateActivityFlavoursStatus(new MDMSVC.DC_ActivityFlavoursStatus()
                {
                    Activity_Flavour_Id       = Activity_Flavour_Id,
                    Activity_Status           = ddlActivity_Flavour_Status.SelectedItem.Text,
                    Activity_StatusNotes      = txtActivity_Flavour_StatusNotes.Text,
                    Activity_Status_Edit_Date = DateTime.Now,
                    Activity_Status_Edit_User = System.Web.HttpContext.Current.User.Identity.Name
                });
                // Response.Redirect("/activity/ManageActivityFlavour?Activity_Flavour_Id=" + Activity_Flavour_Id, true);
                BootstrapAlert.BootstrapAlertMessage(dvMsgStatusUpdate, "Activity Status updated successfully", BootstrapAlertType.Success);
                Flavours.getFlavourInfo("header");
            }
            catch
            {
            }
        }
        protected void grdSupplierSchedule_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString());

            Session["SupplierScheduleId"] = myRow_Id;
            GridViewRow row   = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
            int         index = row.RowIndex;

            if (e.CommandName == "Select")
            {
                msgAlert.Style.Add(HtmlTextWriterStyle.Display, "none");
                LoadSupplierDatabyScheduleId(myRow_Id);
            }

            else if (e.CommandName.ToString() == "SoftDelete")
            {
                TLGX_Consumer.MDMSVC.DC_Supplier_Schedule_RQ newObj = new MDMSVC.DC_Supplier_Schedule_RQ
                {
                    SupplierScheduleID = myRow_Id,
                    Edit_Date          = DateTime.Now,
                    Edit_User          = System.Web.HttpContext.Current.User.Identity.Name
                };
                if (_objSchedularService.SoftDeleteDetails(newObj))
                {
                    BootstrapAlert.BootstrapAlertMessage(msgAlert, "Supplier Scheduler has been deleted successfully", BootstrapAlertType.Success);
                    LoadSupplierScheduleData();
                }
                ;
            }
        }
Exemple #5
0
        protected void btnMapAllForgrdAccoMaps_Click(object sender, EventArgs e)
        {
            Guid Accomodation_ID = Guid.Parse(((Button)sender).CommandArgument);

            divMsgForMapping.Style.Add(HtmlTextWriterStyle.Display, "none");
            List <MDMSVC.DC_Accomodation_ProductMapping> RQ = new List <MDMSVC.DC_Accomodation_ProductMapping>();
            Guid myRow_Id;

            foreach (GridViewRow row in grdAccoMaps.Rows)
            {
                int index = row.RowIndex;
                myRow_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[0].ToString());
                if (myRow_Id != null)
                {
                    MDMSVC.DC_Accomodation_ProductMapping newObj = new MDMSVC.DC_Accomodation_ProductMapping
                    {
                        Accommodation_ProductMapping_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[0].ToString()),
                        Accommodation_Id = Guid.Parse(grdAccoMaps.DataKeys[index].Values[1].ToString()),
                        Status           = "MAPPED",
                        IsActive         = true,
                        Edit_Date        = DateTime.Now,
                        Edit_User        = System.Web.HttpContext.Current.User.Identity.Name
                    };
                    RQ.Add(newObj);
                }
            }
            if (MapSvc.UpdateProductMappingData(RQ))
            {
                divMsgForMapping.Style.Add("display", "none");
                divMsgForUnMapping.Style.Add("display", "block");
                BootstrapAlert.BootstrapAlertMessage(divMsgForUnMapping, "Record Mapped successfully", BootstrapAlertType.Success);
                fillAPMrequestobject(Accomodation_ID, 0, "manual");
                fillmappeddata(Accomodation_ID, 0);
            }
        }
        protected void btnAddZoneCity_Click(object sender, EventArgs e)
        {
            dvmsgUpdateZone.Style.Add("display", "none");
            MDMSVC.DC_ZoneRQ RQ = new MDMSVC.DC_ZoneRQ();
            RQ.Create_Date = DateTime.Now;
            RQ.Create_User = System.Web.HttpContext.Current.User.Identity.Name;;
            RQ.Zone_id     = Zone_Id;
            if (ddlMasterCityEdit.SelectedValue != "0")
            {
                RQ.City_id = new Guid(ddlMasterCityEdit.SelectedValue);
            }
            var result = masterSVc.AddZoneCityMapping(RQ);

            if (result != null)
            {
                if (result.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsgaddZoneCity, "City has been added successfully", BootstrapAlertType.Success);
                    fillgrdZoneCitiesData(Zone_Id);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsgaddZoneCity, result.StatusMessage, (BootstrapAlertType)result.StatusCode);
                }
            }
        }
Exemple #7
0
        protected void frmvwAddUpdateBoneProfile_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            TextBox txtTestDate           = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtTestDate");
            TextBox txtVitaminD           = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtVitaminD");
            TextBox txtParathyroidHormone = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtParathyroidHormone");
            TextBox txtCalcium            = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtCalcium");
            TextBox txtMagnesium          = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtMagnesium");
            TextBox txtNeutrophils        = (TextBox)frmvwAddUpdateBoneProfile.FindControl("txtNeutrophils");


            if (e.CommandName == "AddBoneProfile")
            {
                DC_Message            _msg    = new DC_Message();
                DC_BoneProfileReports _objAdd = new DC_BoneProfileReports();
                _objAdd.TestDate           = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.PatientID          = GetPatientID();
                _objAdd.VitaminD           = txtVitaminD.Text;
                _objAdd.ParathyroidHormone = txtParathyroidHormone.Text;
                _objAdd.Calcium            = txtCalcium.Text;
                _objAdd.Magnesium          = txtMagnesium.Text;
                _objAdd.Neutrophils        = txtNeutrophils.Text;
                _objAdd.CreatedBy          = "Ajay";
                _objAdd.CreatedDate        = DateTime.Today;
                _msg = _objDL.AddUpdateBoneProfileReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateBoneProfile.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
            if (e.CommandName == "UpdateBoneProfile")
            {
                DC_Message            _msg    = new DC_Message();
                DC_BoneProfileReports _objAdd = new DC_BoneProfileReports();
                _objAdd.BPR_TestReportID   = Guid.Parse(Convert.ToString(frmvwAddUpdateBoneProfile.DataKey.Value));
                _objAdd.TestDate           = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.PatientID          = GetPatientID();
                _objAdd.VitaminD           = txtVitaminD.Text;
                _objAdd.ParathyroidHormone = txtParathyroidHormone.Text;
                _objAdd.Calcium            = txtCalcium.Text;
                _objAdd.Magnesium          = txtMagnesium.Text;
                _objAdd.Neutrophils        = txtNeutrophils.Text;
                _objAdd.EditedBy           = "Ajay";
                _objAdd.EditedDate         = DateTime.Today;
                _msg = _objDL.AddUpdateBoneProfileReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateBoneProfile.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, (BootstrapAlertType)(_msg.StatusCode));
                    frmvwAddUpdateBoneProfile.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
        }
        protected void grdSupplierMarkets_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString());

            MDMSVC.DC_Message _msg = new MDMSVC.DC_Message();
            if (e.CommandName.ToString() == "Select")
            {
                dvMsg.Style.Add("display", "none");
                frmSupplierMarket.ChangeMode(FormViewMode.Edit);
                var result = _objMaster.GetSupplierMarket(new MDMSVC.DC_SupplierMarket()
                {
                    Supplier_Market_Id = myRow_Id
                });
                frmSupplierMarket.DataSource = result;
                frmSupplierMarket.DataBind();
            }
            else if (e.CommandName.ToString() == "SoftDelete")
            {
                _msg = _objMaster.SupplierMarketSoftDelete(new MDMSVC.DC_SupplierMarket()
                {
                    Supplier_Market_Id = myRow_Id,
                    IsActive           = false,
                    Edit_Date          = DateTime.Now,
                    Edit_User          = System.Web.HttpContext.Current.User.Identity.Name
                });
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierMarket.ChangeMode(FormViewMode.Insert);
                    frmSupplierMarket.DataBind();
                    bindSUpplierMarketsGrid();
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Market has been deleted successfully", BootstrapAlertType.Success);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }

            else if (e.CommandName.ToString() == "UnDelete")
            {
                _msg = _objMaster.SupplierMarketSoftDelete(new MDMSVC.DC_SupplierMarket()
                {
                    Supplier_Market_Id = myRow_Id,
                    IsActive           = true,
                    Edit_Date          = DateTime.Now,
                    Edit_User          = System.Web.HttpContext.Current.User.Identity.Name
                });
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierMarket.ChangeMode(FormViewMode.Insert);
                    frmSupplierMarket.DataBind();
                    bindSUpplierMarketsGrid();
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Market has been retrived successfully", BootstrapAlertType.Success);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
        }
 protected void btnCopyRoomDef_Click(object sender, EventArgs e)
 {
     //Get Accommodation_RoomInfo_Id and  Category
     Accomodation_ID = Guid.Parse(Request.QueryString["Hotel_Id"]);
     TLGX_Consumer.MDMSVC.DC_Accomodation_CopyRoomDef newObj = new MDMSVC.DC_Accomodation_CopyRoomDef
     {
         Accommodation_RoomInfo_Id = Guid.Parse(hdnAccommodation_RoomInfo_Id.Value),
         Accommodation_Id          = Accomodation_ID,
         NewRoomCategory           = txtRoomCategory.Text,
         Create_User = System.Web.HttpContext.Current.User.Identity.Name
     };
     MDMSVC.DC_Message _msg = new MDMSVC.DC_Message();
     _msg = AccSvc.CopyAccomodationInfo(newObj);
     if (_msg != null)
     {
         if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
         {
             GetRoomInfoDetails(PageSize, intPageIndex);
             hdnFlagCopyRoomInfo.Value = "true";
             BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success);
         }
         else if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Duplicate)
         {
             BootstrapAlert.BootstrapAlertMessage(dvmsgCopyStatus, _msg.StatusMessage, BootstrapAlertType.Duplicate);
         }
     }
     ;
 }
Exemple #10
0
        protected void frmStateUpdate_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            #region Get Controls
            Guid    myCountryRow_Id   = Guid.Parse(Countryid);
            TextBox txtStateName      = (TextBox)frmStateUpdate.FindControl("txtStateName");
            TextBox txtStateCode      = (TextBox)frmStateUpdate.FindControl("txtStateCode");
            TextBox txtStateLocalName = (TextBox)frmStateUpdate.FindControl("txtLocalLanguage");

            #endregion

            if (e.CommandName.ToString() == "Save")
            {
                Guid myStateRow_Id = Guid.Parse(grdStateList.SelectedDataKey.Value.ToString());
                MDMSVC.DC_Master_State _objstateMaster = new DC_Master_State();
                _objstateMaster.State_Id   = myStateRow_Id;
                _objstateMaster.State_Name = txtStateName.Text.Trim();
                _objstateMaster.State_Code = txtStateCode.Text.Trim();
                _objstateMaster.StateName_LocalLanguage = txtStateLocalName.Text.Trim();
                _objstateMaster.Edit_User  = System.Web.HttpContext.Current.User.Identity.Name;
                _objstateMaster.Edit_Date  = DateTime.Now;
                _objstateMaster.Country_Id = Guid.Parse(Countryid);
                DC_Message _msg = new DC_Message();
                _msg = _objMaster.UpdateStatesMaster(_objstateMaster);
                if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
                {
                    frmStateUpdate.ChangeMode(FormViewMode.Insert);
                    frmStateUpdate.DataBind();
                    hdnFlagState.Value = "true";
                    BootstrapAlert.BootstrapAlertMessage(dvMsgState, "State Details has been updated successfully", BootstrapAlertType.Success);
                    fillgrdStateList(Guid.Parse(Countryid));
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(msgAlertState, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
            else if (e.CommandName == "Add")
            {
                MDMSVC.DC_Master_State _objstateMaster = new DC_Master_State();
                _objstateMaster.State_Name = txtStateName.Text.Trim();
                _objstateMaster.State_Code = txtStateCode.Text.Trim();
                _objstateMaster.StateName_LocalLanguage = txtStateLocalName.Text.Trim();
                _objstateMaster.Create_User             = System.Web.HttpContext.Current.User.Identity.Name;
                _objstateMaster.Create_Date             = DateTime.Now;
                _objstateMaster.Country_Id = Guid.Parse(Countryid);
                DC_Message _msg = _objMaster.AddStatesMaster(_objstateMaster);
                if (_msg.StatusCode == ReadOnlyMessageStatusCode.Success)
                {
                    frmStateUpdate.ChangeMode(FormViewMode.Insert);
                    frmStateUpdate.DataBind();
                    hdnFlagState.Value = "true";
                    BootstrapAlert.BootstrapAlertMessage(dvMsgState, "State Details has been added successfully", BootstrapAlertType.Success);
                    fillgrdStateList(Guid.Parse(Countryid));
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(msgAlertState, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
        }
        protected void frmSupplierDetail_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            string       supplierType;
            int?         priority;
            DropDownList ddlStatusEdit       = (DropDownList)frmSupplierDetail.FindControl("ddlStatusEdit");
            DropDownList ddlSupplierType     = (DropDownList)frmSupplierDetail.FindControl("ddlSupplierType");
            DropDownList ddlPriorityEdit     = (DropDownList)frmSupplierDetail.FindControl("ddlPriorityEdit");
            TextBox      txtNameSupplierEdit = (TextBox)frmSupplierDetail.FindControl("txtNameSupplierEdit");
            TextBox      txtCodeSupplierEdit = (TextBox)frmSupplierDetail.FindControl("txtCodeSupplierEdit");
            CheckBox     chkIsFullPull       = (CheckBox)frmSupplierDetail.FindControl("chkIsFullPull");

            MDMSVC.DC_Message _msg = new MDMSVC.DC_Message();

            if (e.CommandName == "EditCommand")
            {
                if (ddlSupplierType.SelectedIndex == 0)
                {
                    supplierType = string.Empty;
                }
                else
                {
                    supplierType = ddlSupplierType.SelectedItem.Text;
                }

                if (ddlPriorityEdit.SelectedIndex == 0)
                {
                    priority = null;
                }
                else
                {
                    priority = Convert.ToInt32(ddlPriorityEdit.SelectedItem.Value);
                }


                _msg = _objMaster.AddUpdateSupplier(new MDMSVC.DC_Supplier()
                {
                    Supplier_Id  = Guid.Parse(Request.QueryString["Supplier_Id"]),
                    Name         = txtNameSupplierEdit.Text.Trim(),
                    Code         = txtCodeSupplierEdit.Text.Trim(),
                    SupplierType = supplierType,
                    StatusCode   = ddlStatusEdit.SelectedItem.Text,
                    Edit_Date    = DateTime.Now,
                    Edit_User    = System.Web.HttpContext.Current.User.Identity.Name,
                    Priority     = priority,
                    IsFullPull   = chkIsFullPull.Checked
                });
                if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success))
                {
                    frmSupplierDetail.ChangeMode(FormViewMode.Edit);
                    frmSupplierDetail.DataBind();
                    BootstrapAlert.BootstrapAlertMessage(dvMsgUpdateSupplierDetails, _msg.StatusMessage, BootstrapAlertType.Success);
                    FillPageData(Guid.Parse(Request.QueryString["Supplier_Id"]));
                }
                else
                {
                    hdnFlag.Value = "false";
                    BootstrapAlert.BootstrapAlertMessage(dvMsgUpdateSupplierDetails, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
                }
            }
        }
Exemple #12
0
        protected void btnViewReport_Click(object sender, EventArgs e)
        {
            if (ddlSupplierName.SelectedValue == "0" || ddlCompareSupplier1.SelectedIndex == -1)
            {
                BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "Please select valid Supplier & Compare Supplier before view report.", BootstrapAlertType.Danger);
                return;
            }


            List <Guid> selectedSupplier = GetSelectedList(ddlCompareSupplier1);

            TLGX_Consumer.MDMSVC.DC_SupplerVSupplier_Report_RQ dC_SupplerVSupplier_Report_RQ1 = new MDMSVC.DC_SupplerVSupplier_Report_RQ();

            if (ddlSupplierName.SelectedIndex != 0)
            {
                Guid SourSupplierName = new Guid(ddlSupplierName.SelectedValue);

                dC_SupplerVSupplier_Report_RQ1.Accommodation_Source_Id = SourSupplierName;

                //dC_SupplerVSupplier_Report_RQ1.Compare_WithSupplier_Ids = new Guid[] { new Guid("773498FA-4F94-41AA-B5C2-EC28C8B8698D"), new Guid("DBD23ED5-A2AA-4A59-9265-6B198D6C8BFD") };
                dC_SupplerVSupplier_Report_RQ1.Compare_WithSupplier_Ids = selectedSupplier.ToArray();


                GetAccommodationSupplierVSuplierReport(dC_SupplerVSupplier_Report_RQ1);
            }
        }
        protected void btnadddetails_Click(object sender, EventArgs e)
        {
            var supplier = ddlSupplierList.SelectedItem.Value;
            var entity   = ddlEntityList.SelectedItem.Value;
            var path     = txtApiLocation.Text;

            if (supplier == "0" || entity == "0")
            {
                BootstrapAlert.BootstrapAlertMessage(dvError, "Please select both Entity and Supplier name!!", BootstrapAlertType.Warning);
            }
            else if (path == "API Location not found")
            {
                BootstrapAlert.BootstrapAlertMessage(dvError, "API Location not found.Please select again!!", BootstrapAlertType.Danger);
            }
            else
            {
                Guid   applicationid = Guid.Parse(btnadddetails.CommandArgument);
                string callby        = System.Web.HttpContext.Current.User.Identity.Name;
                var    res           = _objMappingSVCs.Pentaho_SupplierApi_Call(applicationid, callby);
                if (res != null)
                {
                    BootstrapAlert.BootstrapAlertMessage(dvError, res.StatusMessage, (BootstrapAlertType)res.StatusCode);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvError, "Error!!", BootstrapAlertType.Danger);
                }
            }
        }
        protected void grdMappingAttrVal_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString());

            GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
            CheckBox    chkAttrValIsActive           = (CheckBox)row.FindControl("chkAttrValIsActive");
            TextBox     txtSupplierAttributeValue    = (TextBox)row.FindControl("txtSupplierAttributeValue");
            Label       SystemMasterAttributeValueId = (Label)row.FindControl("lblSystemMasterAttributeValueId");

            if (e.CommandName.ToString() == "EditVal")
            {
                MDMSVC.DC_MasterAttributeValueMapping newObj = new MDMSVC.DC_MasterAttributeValueMapping
                {
                    MasterAttributeMapping_Id      = Guid.Parse(frmAttributeMapping.DataKey.Value.ToString()),
                    MasterAttributeValueMapping_Id = myRow_Id,
                    IsActive = chkAttrValIsActive.Checked,
                    SupplierMasterAttributeValue = txtSupplierAttributeValue.Text,
                    Edit_Date   = DateTime.Now,
                    Edit_User   = System.Web.HttpContext.Current.User.Identity.Name,
                    Create_Date = DateTime.Now,
                    Create_User = System.Web.HttpContext.Current.User.Identity.Name,
                    SystemMasterAttributeValue_Id = Guid.Parse(SystemMasterAttributeValueId.Text)
                };

                var result = MapSvc.Mapping_AttributeValue_Update(newObj);
                BootstrapAlert.BootstrapAlertMessage(msgAlert, result.StatusMessage, (BootstrapAlertType)(result.StatusCode));
            }
        }
        protected void btnEditPort_Click(object sender, EventArgs e)
        {
            MDMSVC.DC_Message    _msg    = new MDMSVC.DC_Message();
            MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster();
            _newObj.Port_Id       = Guid.Parse(Port_ID);
            _newObj.OAG_loc       = txtOAG_loc.Text;
            _newObj.OAG_multicity = txtOAG_multicity.Text;
            _newObj.Oag_lon       = txtoag_lon.Text;
            _newObj.Oag_inactive  = txtoag_inactive.Text;
            _newObj.MappingStatus = txtMappingStatus.Text;
            _newObj.Oag_ctryname  = txtoag_ctryname.Text;
            _newObj.Oag_state     = txtoag_state.Text;
            _newObj.Oag_substate  = txtoag_substate.Text;
            _newObj.Oag_timediv   = txtoag_timediv.Text;
            _newObj.Oag_lat       = txtoag_lat.Text;
            _newObj.OAG_type      = txtOAG_type.Text;
            _newObj.OAG_subtype   = txtOAG_subtype.Text;
            _newObj.Oag_name      = txtoag_name.Text;
            _newObj.Oag_portname  = txtoag_portname.Text;
            _newObj.Oag_ctry      = txtoag_ctry.Text;
            _newObj.Oag_subctry   = txtoag_subctry.Text;
            _newObj.City_Id       = Guid.Parse(ddlCityEdit.SelectedValue);
            _newObj.Country_Id    = Guid.Parse(ddlCountryEdit.SelectedValue);
            _newObj.State_Id      = Guid.Parse(ddlStateEdit.SelectedValue);

            _msg = _objMaster.UpdatePortMaster(_newObj);
            BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
        }
        protected void btnHotelGeoCode_Click(object sender, EventArgs e)
        {
            MDMSVC.DC_MasterAttribute RQ = new MDMSVC.DC_MasterAttribute();
            RQ.MasterFor = "MappingFileConfig";
            RQ.Name      = "MappingEntity";
            var resvalues = _objMasterSVC.GetAllAttributeAndValues(RQ);

            if (resvalues != null && resvalues.Count > 0)
            {
                Guid entityId   = Guid.Parse((resvalues.Where(x => x.AttributeValue == "GeoCode").Select(y => y.MasterAttributeValue_Id).FirstOrDefault()).ToString());
                Guid SupplierId = Guid.Parse(ddlSupplierName.SelectedItem.Value);
                var  res        = MapSvc.Pentaho_SupplierApiLocationId_Get(SupplierId, entityId);

                if (res != null && res.Count > 0)
                {
                    string callby            = System.Web.HttpContext.Current.User.Identity.Name;
                    var    ApplicationCallId = Guid.Parse(res[0].ApiLocation_Id.ToString());
                    var    Geo_res           = MapSvc.Pentaho_SupplierApi_Call(ApplicationCallId, callby);
                    BootstrapAlert.BootstrapAlertMessage(dvMsgHotel, Geo_res.StatusMessage, BootstrapAlertType.Information);
                }
                else
                {
                    BootstrapAlert.BootstrapAlertMessage(dvMsgHotel, "API Location not found", BootstrapAlertType.Information);
                }
            }
        }
        protected void frmvwAddUpdateLipidProfile_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            #region Controls
            TextBox txtTestDate      = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtTestDate");
            TextBox txtTChol         = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtTChol");
            TextBox txtTriglycerides = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtTriglycerides");
            TextBox txtHDLChol       = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtHDLChol");
            TextBox txtLDLChol       = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtLDLChol");
            TextBox txtTCholHDL      = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtTCholHDL");
            TextBox txtLDLHDLRatio   = (TextBox)frmvwAddUpdateLipidProfile.FindControl("txtLDLHDLRatio");


            #endregion
            if (e.CommandName == "AddLipidProfile")
            {
                DC_Message             _msg    = new DC_Message();
                DC_LipidProfileReports _objAdd = new DC_LipidProfileReports();
                _objAdd.TestDate      = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.PatientID     = GetPatientID();
                _objAdd.TChol         = txtTChol.Text;
                _objAdd.Triglycerides = txtTriglycerides.Text;
                _objAdd.HDLChol       = txtHDLChol.Text;
                _objAdd.LDLChol       = txtLDLChol.Text;
                _objAdd.TCholHDL      = txtTCholHDL.Text;
                _objAdd.LDLHDLRatio   = txtLDLHDLRatio.Text;
                _objAdd.CreatedBy     = "Ajay";
                _objAdd.CreatedDate   = DateTime.Today;
                _msg = _objDL.AddUpdateLipidProfileReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateLipidProfile.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
            if (e.CommandName == "UpdateLipidProfile")
            {
                DC_Message             _msg    = new DC_Message();
                DC_LipidProfileReports _objAdd = new DC_LipidProfileReports();
                _objAdd.LPR_TestReportID = Guid.Parse(Convert.ToString(frmvwAddUpdateLipidProfile.DataKey.Value));
                _objAdd.TestDate         = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.PatientID        = GetPatientID();
                _objAdd.TChol            = txtTChol.Text;
                _objAdd.Triglycerides    = txtTriglycerides.Text;
                _objAdd.HDLChol          = txtHDLChol.Text;
                _objAdd.LDLChol          = txtLDLChol.Text;
                _objAdd.TCholHDL         = txtTCholHDL.Text;
                _objAdd.LDLHDLRatio      = txtLDLHDLRatio.Text;
                _objAdd.EditedBy         = "Ajay";
                _objAdd.EditedDate       = DateTime.Today;
                _msg = _objDL.AddUpdateLipidProfileReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateLipidProfile.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
        }
Exemple #18
0
        protected void frmPortdetail_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            #region Get Controls
            //Getting all controls here
            TextBox txtoag_portname  = (TextBox)frmPortdetail.FindControl("txtoag_portname");
            TextBox txtOAG_loc       = (TextBox)frmPortdetail.FindControl("txtOAG_loc");
            TextBox txtOAG_multicity = (TextBox)frmPortdetail.FindControl("txtOAG_multicity");
            TextBox txtoag_inactive  = (TextBox)frmPortdetail.FindControl("txtoag_inactive");
            TextBox txtMappingStatus = (TextBox)frmPortdetail.FindControl("txtMappingStatus");
            TextBox txtoag_ctryname  = (TextBox)frmPortdetail.FindControl("txtoag_ctryname");
            TextBox txtoag_state     = (TextBox)frmPortdetail.FindControl("txtoag_state");

            TextBox txtoag_substate = (TextBox)frmPortdetail.FindControl("txtoag_substate");
            TextBox txtoag_timediv  = (TextBox)frmPortdetail.FindControl("txtoag_timediv");
            TextBox txtoag_lat      = (TextBox)frmPortdetail.FindControl("txtoag_lat");
            TextBox txtOAG_type     = (TextBox)frmPortdetail.FindControl("txtOAG_type");

            TextBox txtOAG_subtype = (TextBox)frmPortdetail.FindControl("txtOAG_subtype");
            TextBox txtoag_name    = (TextBox)frmPortdetail.FindControl("txtoag_name");
            TextBox txtoag_ctry    = (TextBox)frmPortdetail.FindControl("txtoag_ctry");
            TextBox txtoag_subctry = (TextBox)frmPortdetail.FindControl("txtoag_subctry");
            TextBox txtoag_lon     = (TextBox)frmPortdetail.FindControl("txtoag_lon");


            DropDownList ddlCountryEdit = (DropDownList)frmPortdetail.FindControl("ddlCountryEdit");
            DropDownList ddlStateEdit   = (DropDownList)frmPortdetail.FindControl("ddlStateEdit");
            DropDownList ddlCityEdit    = (DropDownList)frmPortdetail.FindControl("ddlCityEdit");

            #endregion
            if (e.CommandName == "Add")
            {
                MDMSVC.DC_Message    _msg    = new MDMSVC.DC_Message();
                MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster();
                _newObj.Port_Id       = Guid.NewGuid();
                _newObj.OAG_loc       = Convert.ToString(txtOAG_loc.Text);
                _newObj.OAG_multicity = Convert.ToString(txtOAG_multicity.Text);
                _newObj.OAG_type      = Convert.ToString(txtoag_lon.Text);
                _newObj.Oag_inactive  = Convert.ToString(txtoag_inactive.Text);
                _newObj.MappingStatus = Convert.ToString(txtMappingStatus.Text);
                _newObj.Oag_ctryname  = Convert.ToString(txtoag_ctryname.Text);
                _newObj.Oag_state     = Convert.ToString(txtoag_state.Text);
                _newObj.Oag_substate  = Convert.ToString(txtoag_substate.Text);
                _newObj.Oag_timediv   = Convert.ToString(txtoag_timediv.Text);
                _newObj.Oag_lat       = Convert.ToString(txtoag_lat.Text);
                _newObj.OAG_type      = Convert.ToString(txtOAG_type.Text);
                _newObj.OAG_subtype   = Convert.ToString(txtOAG_subtype.Text);
                _newObj.Oag_name      = Convert.ToString(txtoag_name.Text);
                _newObj.Oag_portname  = Convert.ToString(txtoag_portname.Text);
                _newObj.Oag_ctry      = Convert.ToString(txtoag_ctry.Text);
                _newObj.Oag_subctry   = Convert.ToString(txtoag_subctry.Text);
                _newObj.City_Id       = Guid.Parse(ddlCityEdit.SelectedValue);
                _newObj.Country_Id    = Guid.Parse(ddlCountryEdit.SelectedValue);
                _newObj.State_Id      = Guid.Parse(ddlStateEdit.SelectedValue);
                _msg          = _serviceMaster.AddPortMaster(_newObj);
                hdnFlag.Value = "true";
                BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
            }
        }
 protected void btnRoomRun_Click(object sender, EventArgs e)
 {
     if (ddlSupplierName.SelectedItem.Text != "--All Suppliers--")
     {
         Guid SupplierId = Guid.Parse(ddlSupplierName.SelectedItem.Value);
         var  result     = MapSvc.KeywordReRun("RoomType", "SUPPLIER", SupplierId);
         BootstrapAlert.BootstrapAlertMessage(dvMsgRoomType, result.StatusMessage, BootstrapAlertType.Information);
     }
 }
 protected void btnCountryReRunSchedule_Click(object sender, EventArgs e)
 {
     if (ddlSupplierName.SelectedValue != "0")
     {
         var msg = InsertFileRecord("Country", ReRunMode.SCHEDULE);
         dvMsgCountry.Style.Add("display", "block");
         BootstrapAlert.BootstrapAlertMessage(dvMsgCountry, msg.StatusMessage, (BootstrapAlertType)Convert.ToInt32(msg.StatusCode));
     }
 }
Exemple #21
0
        protected void UploadButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (FileUploadControl.HasFile)
                {
                    if (!FileUploadControl.PostedFile.ContentType.Equals("application/pdf", StringComparison.OrdinalIgnoreCase))
                    {
                        BootstrapAlert.BootstrapAlertMessage(divmsg, "Only PDF files are supported. Uploaded File Type: " + FileUploadControl.PostedFile.ContentType, BootstrapAlertType.Warning);
                    }
                    else if (!FileUploadControl.HasFile)
                    {
                        BootstrapAlert.BootstrapAlertMessage(divmsg, "You must select a valid file to upload.", BootstrapAlertType.Warning);
                    }

                    else if (FileUploadControl.FileContent.Length == 0)
                    {
                        BootstrapAlert.BootstrapAlertMessage(divmsg, "You must select a non empty file to upload.", BootstrapAlertType.Warning);
                    }
                    else
                    {
                        DC_Message _msg = new DC_Message();
                        // if(FileUploadControl.FileName.GetType() == "")
                        string fileDisplayname          = System.IO.Path.GetFileName(FileUploadControl.FileName);
                        string FileNameWithOutExtension = System.IO.Path.GetFileNameWithoutExtension(FileUploadControl.FileName);
                        string filename = FileNameWithOutExtension + DateTime.Now.Ticks.ToString() + ".pdf";
                        string filepath = Server.MapPath("ReportUploaded/") + filename;
                        PatientID = Guid.Parse(Request.QueryString["PatientID"]);
                        FileUploadControl.SaveAs(filepath);
                        _msg = _objDL.AddUpdateFileDetails(new DataContract.DC_FileUploadDetails()
                        {
                            FileDispalyName = fileDisplayname,
                            FileName        = filename,
                            FilePath        = filepath,
                            PatientID       = PatientID,
                            TestReportID    = Guid.NewGuid(),
                            TestName        = txtTestName.Text,
                            CreatedBy       = "System",
                            CreatedDate     = DateTime.Now,
                            TestDate        = Convert.ToDateTime(txtTestDate.Text),
                        });
                        if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                        {
                            BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                            hdnFlag.Value = "true";
                            ClearControls();
                            BindGridView();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            Activity_Flavour_Id = new Guid(Request.QueryString["Activity_Flavour_Id"]);

            MDMSVC.DC_Activity_Inclusions newObj = new MDMSVC.DC_Activity_Inclusions();

            if (btnAdd.Text == "Update")
            {
                newObj.Activity_Inclusions_Id = Guid.Parse(hdnId.Value);
            }

            newObj.Activity_Flavour_Id = Activity_Flavour_Id;
            if (chkIsInclusion.Checked)
            {
                newObj.IsInclusion = true;
            }
            else
            {
                newObj.IsInclusion = false;
            }
            newObj.InclusionFor         = ddlInclusionFor.SelectedItem.Text;
            newObj.InclusionType        = ddlInclusionType.SelectedItem.Text;
            newObj.InclusionName        = txtName.Text;
            newObj.InclusionDescription = txtDescription.Text;

            if (!string.IsNullOrWhiteSpace(txtFrom.Text))
            {
                newObj.InclusionFrom = DateTime.ParseExact(txtFrom.Text.Trim(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }
            if (!string.IsNullOrWhiteSpace(txtTo.Text))
            {
                newObj.InclusionTo = DateTime.ParseExact(txtTo.Text.Trim(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
            }

            newObj.Create_User = System.Web.HttpContext.Current.User.Identity.Name;
            newObj.Edit_User   = System.Web.HttpContext.Current.User.Identity.Name;

            newObj.IsActive = true;

            MDMSVC.DC_Message _msg = ActSVC.AddUpdateActivityInclusions(newObj);
            if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
            {
                divMsgAlertIncExc.Visible = true;
                BootstrapAlert.BootstrapAlertMessage(divMsgAlertIncExc, _msg.StatusMessage, BootstrapAlertType.Success);
            }
            else
            {
                divMsgAlertIncExc.Visible = true;
                BootstrapAlert.BootstrapAlertMessage(divMsgAlertIncExc, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
            }


            ResetControls();

            BindInclusionsExclusions();
        }
Exemple #23
0
        protected void btnUpdateCountry_Click(object sender, EventArgs e)
        {
            #region Fetching Data from screen to update country
            DC_Country _objCountry = new DC_Country();
            _objCountry.Create_Date = DateTime.Now;
            _objCountry.Create_User = System.Web.HttpContext.Current.User.Identity.Name;
            _objCountry.Country_Id  = Guid.Parse(Countryid);
            _objCountry.Name        = Convert.ToString(txtCountryName.Text);
            _objCountry.Code        = Convert.ToString(txtCountryCode.Text);
            _objCountry.Status      = Convert.ToString(ddlStatus.SelectedValue);

            _objCountry.RegionName = Convert.ToString(txtRegionName.Text);
            _objCountry.RegionCode = Convert.ToString(txtRegionCode.Text);
            _objCountry.Key        = Convert.ToString(txtKey.Text);
            _objCountry.Rank       = Convert.ToString(txtRank.Text);
            _objCountry.Priority   = Convert.ToString(txtPriority.Text);


            _objCountry.ISOofficial_name_en = Convert.ToString(txt_ISOofficial_name_en.Text);
            _objCountry.ISO3166_1_Alpha_2   = Convert.ToString(txt_ISO3166_1_Alpha_2.Text);
            _objCountry.ISO3166_1_Alpha_3   = Convert.ToString(txt_ISO3166_1_Alpha_3.Text);
            _objCountry.ISO3166_1_M49       = Convert.ToString(txt_ISO3166_1_M49.Text);
            _objCountry.ISO3166_1_ITU       = Convert.ToString(txt_ISO3166_1_ITU.Text);
            _objCountry.MARC = Convert.ToString(txt_MARC.Text);
            _objCountry.WMO  = Convert.ToString(txt_WMO.Text);
            _objCountry.DS   = Convert.ToString(txt_DS.Text);
            _objCountry.Dial = Convert.ToString(txt_Dial.Text);
            _objCountry.ISO4217_currency_alphabetic_code = Convert.ToString(txt_ISO4217_currency_alphabetic_code.Text);
            _objCountry.ISO4217_currency_country_name    = Convert.ToString(txt_ISO4217_currency_country_name.Text);
            _objCountry.ISO4217_currency_minor_unit      = Convert.ToString(txt_ISO4217_currency_minor_unit.Text);
            _objCountry.ISO4217_currency_name            = Convert.ToString(txt_ISO4217_currency_name.Text);
            _objCountry.ISO4217_currency_numeric_code    = Convert.ToString(txt_ISO4217_currency_numeric_code.Text);
            _objCountry.ISO3166_1_Capital    = Convert.ToString(txt_ISO3166_1_Capital.Text);
            _objCountry.ISO3166_1_Continent  = Convert.ToString(txt_ISO3166_1_Continent.Text);
            _objCountry.ISO3166_1_TLD        = Convert.ToString(txt_ISO3166_1_TLD.Text);
            _objCountry.ISO3166_1_Languages  = Convert.ToString(txt_ISO3166_1_Languages.Text);
            _objCountry.ISO3166_1_Geoname_ID = Convert.ToString(txt_ISO3166_1_Geoname_ID.Text);
            _objCountry.ISO3166_1_EDGAR      = Convert.ToString(txt_ISO3166_1_EDGAR.Text);
            _objCountry.GooglePlaceID        = Convert.ToString(txt_GooglePlaceID.Text);
            #endregion

            _objCountry.Edit_Date = DateTime.Now;
            _objCountry.Edit_User = System.Web.HttpContext.Current.User.Identity.Name;
            _objCountry.Action    = "Update";
            MasterDataSVCs _objMaster = new MasterDataSVCs();
            DC_Message     _msg       = new DC_Message();
            _msg = _objMaster.AddUpdateCountryMaster(_objCountry);
            if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsgCountry, "Country has been updated successfully", BootstrapAlertType.Success);
            }
            else
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsgCountry, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
            }
        }
Exemple #24
0
        protected void gvFileUploadSearchForNew_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            try
            {
                GridViewRow row     = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                int         index   = row.RowIndex;
                Guid        myRowId = Guid.Parse(gvFileUploadSearchForNew.DataKeys[index].Values[0].ToString());


                if (e.CommandName == "SoftDelete")
                {
                    MDMSVC.DC_SupplierImportFileDetails_RQ RQ = new MDMSVC.DC_SupplierImportFileDetails_RQ();
                    RQ.SupplierImportFile_Id = myRowId;
                    RQ.PageNo   = 0;
                    RQ.PageSize = int.MaxValue;
                    var res = _objMappingSVCs.GetSupplierStaticFileDetails(RQ);

                    MDMSVC.DC_SupplierImportFileDetails obj = new MDMSVC.DC_SupplierImportFileDetails
                    {
                        SupplierImportFile_Id = myRowId,
                        STATUS       = res[0].STATUS,
                        PROCESS_DATE = DateTime.Now,
                        PROCESS_USER = System.Web.HttpContext.Current.User.Identity.Name,
                        IsActive     = false
                    };

                    var result = _objMappingSVCs.UpdateSupplierStaticFileDetails(obj);
                    fillmatchingdataForNew(10, 0);

                    BootstrapAlert.BootstrapAlertMessage(dvMsg, "File has been deleted Successfully", (BootstrapAlertType)result.StatusCode);
                }
                if (e.CommandName == "UnDelete")
                {
                    MDMSVC.DC_SupplierImportFileDetails_RQ RQ = new MDMSVC.DC_SupplierImportFileDetails_RQ();
                    RQ.SupplierImportFile_Id = myRowId;
                    RQ.PageNo   = 0;
                    RQ.PageSize = int.MaxValue;
                    var res = _objMappingSVCs.GetSupplierStaticFileDetails(RQ);
                    MDMSVC.DC_SupplierImportFileDetails obj = new MDMSVC.DC_SupplierImportFileDetails
                    {
                        SupplierImportFile_Id = myRowId,
                        STATUS       = res[0].STATUS,
                        PROCESS_DATE = DateTime.Now,
                        PROCESS_USER = System.Web.HttpContext.Current.User.Identity.Name,
                        IsActive     = true
                    };
                    var result = _objMappingSVCs.UpdateSupplierStaticFileDetails(obj);
                    fillmatchingdataForNew(10, 0);

                    BootstrapAlert.BootstrapAlertMessage(dvMsg, "File has been un deleted Successfully", (BootstrapAlertType)result.StatusCode);
                }
            }
            catch
            {
            }
        }
Exemple #25
0
        protected void frmvwAddUpdateKidneyFunction_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            TextBox txtTestDate    = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtTestDate");
            TextBox txtSCreatinine = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtSCreatinine");
            TextBox txtUrineACR    = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtUrineACR");
            TextBox txtUrea        = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtUrea");
            TextBox txtBUN         = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtBUN");
            TextBox txtSUricAcid   = (TextBox)frmvwAddUpdateKidneyFunction.FindControl("txtSUricAcid");


            if (e.CommandName == "AddKidneyFunction")
            {
                DC_Message _msg = new DC_Message();
                DC_KidneyFunctionsReports _objAdd = new DC_KidneyFunctionsReports();
                _objAdd.TestDate         = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.KFR_TestReportID = Guid.NewGuid();
                _objAdd.PatientID        = GetPatientID();
                _objAdd.SCreatinine      = txtSCreatinine.Text;
                _objAdd.UrineACR         = txtUrineACR.Text;
                _objAdd.Urea             = txtUrea.Text;
                _objAdd.Bun       = txtBUN.Text;
                _objAdd.SUricAcid = txtSUricAcid.Text;

                _objAdd.CreatedBy   = "Ajay";
                _objAdd.CreatedDate = DateTime.Today;

                _msg = _objDL.AddUpdateKidneyFunctionsReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateKidneyFunction.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
            if (e.CommandName == "UpdateKidneyFunction")
            {
                DC_Message _msg = new DC_Message();
                DC_KidneyFunctionsReports _objAdd = new DC_KidneyFunctionsReports();
                _objAdd.KFR_TestReportID = Guid.Parse(Convert.ToString(frmvwAddUpdateKidneyFunction.DataKey.Value));
                _objAdd.TestDate         = Convert.ToDateTime(txtTestDate.Text);
                _objAdd.SCreatinine      = txtSCreatinine.Text;
                _objAdd.UrineACR         = txtUrineACR.Text;
                _objAdd.Urea             = txtUrea.Text;
                _objAdd.Bun        = txtBUN.Text;
                _objAdd.SUricAcid  = txtSUricAcid.Text;
                _objAdd.EditedBy   = "Ajay";
                _objAdd.EditedDate = DateTime.Today;
                _msg = _objDL.AddUpdateKidneyFunctionsReports(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    frmvwAddUpdateKidneyFunction.ChangeMode(FormViewMode.Insert);
                    BindGridDetails();
                }
            }
        }
        protected void frmAttributeMapping_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            DropDownList ddlSuppliers             = (DropDownList)frmAttributeMapping.FindControl("ddlSuppliers");
            TextBox      txtSupplierAttributeName = (TextBox)frmAttributeMapping.FindControl("txtSupplierAttributeName");
            DropDownList ddlAttributeType         = (DropDownList)frmAttributeMapping.FindControl("ddlAttributeType");

            if (e.CommandName.ToString() == "Add")
            {
                MDMSVC.DC_MasterAttributeMapping newObj = new MDMSVC.DC_MasterAttributeMapping
                {
                    MasterAttributeMapping_Id = Guid.NewGuid(),
                    SupplierMasterAttribute   = txtSupplierAttributeName.Text,
                    Supplier_Id = Guid.Parse(ddlSuppliers.SelectedValue),
                    SystemMasterAttribute_Id = Guid.Parse(ddlAttributeType.SelectedValue),
                    Create_Date = DateTime.Now,
                    Create_User = System.Web.HttpContext.Current.User.Identity.Name,
                    IsActive    = true,
                    Status      = "MAPPED"
                };

                var result = MapSvc.Mapping_Attribute_Add(newObj);

                BootstrapAlert.BootstrapAlertMessage(msgAlert, result.StatusMessage, (BootstrapAlertType)(result.StatusCode));

                if (result.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)
                {
                    BinfFormViewInEditMode(newObj.MasterAttributeMapping_Id);
                }
            }

            else if (e.CommandName.ToString() == "Modify")
            {
                DropDownList ddlStatus = (DropDownList)frmAttributeMapping.FindControl("ddlStatus");

                Guid myRow_Id = Guid.Parse(grdSearchResults.SelectedDataKey.Value.ToString());

                MDMSVC.DC_MasterAttributeMapping newObj = new MDMSVC.DC_MasterAttributeMapping
                {
                    MasterAttributeMapping_Id = myRow_Id,
                    SupplierMasterAttribute   = txtSupplierAttributeName.Text,
                    Supplier_Id = Guid.Parse(ddlSuppliers.SelectedValue),
                    SystemMasterAttribute_Id = Guid.Parse(ddlAttributeType.SelectedValue),
                    Edit_Date   = DateTime.Now,
                    Edit_User   = System.Web.HttpContext.Current.User.Identity.Name,
                    Create_Date = DateTime.Now,
                    Create_User = System.Web.HttpContext.Current.User.Identity.Name,
                    IsActive    = true,
                    Status      = ddlStatus.SelectedItem.Text
                };

                var result = MapSvc.Mapping_Attribute_Update(newObj);
                BootstrapAlert.BootstrapAlertMessage(msgAlert, result.StatusMessage, (BootstrapAlertType)(result.StatusCode));
            }
            ;
        }
        protected void grdRevAndScore_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Guid         myRow_Id        = Guid.Parse(e.CommandArgument.ToString());
            DropDownList ddlReviewType   = (DropDownList)frmRevAndScore.FindControl("ddlReviewType");
            DropDownList ddlReviewSource = (DropDownList)frmRevAndScore.FindControl("ddlReviewSource");
            DropDownList ddlReviewScore  = (DropDownList)frmRevAndScore.FindControl("ddlReviewScore");

            if (e.CommandName.ToString() == "Select")
            {
                frmRevAndScore.ChangeMode(FormViewMode.Edit);
                dvMsg.Style.Add("display", "none");
                MDMSVC.DC_Activity_ReviewsAndScores_RQ RQ = new MDMSVC.DC_Activity_ReviewsAndScores_RQ();
                RQ.Activity_Flavour_Id          = Guid.Parse(Request.QueryString["Activity_Flavour_Id"]);
                RQ.Activity_ReviewsAndScores_Id = myRow_Id;
                var res = ActSVC.GetActReviewsAndScores(RQ);
                frmRevAndScore.DataSource = res;
                frmRevAndScore.DataBind();

                fillReviewType(ddlReviewType);
                fillReviewSource(ddlReviewSource);
                fillReviewScore(ddlReviewScore);

                if (ddlReviewType.Items.Count > 1) // needs to be 1 to handle the "Select" value
                {
                    ddlReviewType.SelectedIndex = ddlReviewType.Items.IndexOf(ddlReviewType.Items.FindByText(res[0].Review_Type.ToString()));
                }
            }
            else if (e.CommandName.ToString() == "SoftDelete")
            {
                TLGX_Consumer.MDMSVC.DC_Activity_ReviewsAndScores newObj = new MDMSVC.DC_Activity_ReviewsAndScores
                {
                    Activity_ReviewsAndScores_Id = myRow_Id,
                    IsActive  = false,
                    Edit_Date = DateTime.Now,
                    Edit_User = System.Web.HttpContext.Current.User.Identity.Name
                };
                var result = ActSVC.AddUpdateActReviewsNScores(newObj);
                BootstrapAlert.BootstrapAlertMessage(dvMsg, result.StatusMessage, (BootstrapAlertType)result.StatusCode);
                BindDataSource();
            }

            else if (e.CommandName.ToString() == "UnDelete")
            {
                TLGX_Consumer.MDMSVC.DC_Activity_ReviewsAndScores newObj = new MDMSVC.DC_Activity_ReviewsAndScores
                {
                    Activity_ReviewsAndScores_Id = myRow_Id,
                    IsActive  = true,
                    Edit_Date = DateTime.Now,
                    Edit_User = System.Web.HttpContext.Current.User.Identity.Name
                };
                var result = ActSVC.AddUpdateActReviewsNScores(newObj);
                BootstrapAlert.BootstrapAlertMessage(dvMsg, result.StatusMessage, (BootstrapAlertType)result.StatusCode);
                BindDataSource();
            }
        }
        protected void frmVitalSign_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            //HtmlInputText txtTestDate = (HtmlInputText)frmVitalSign.FindControl("datepicker");
            TextBox txtdatepicker = (TextBox)frmVitalSign.FindControl("txtdatepicker");

            TextBox     txtBP          = (TextBox)frmVitalSign.FindControl("txtBP");
            TextBox     txtWeight      = (TextBox)frmVitalSign.FindControl("txtWeight");
            TextBox     txtTemperature = (TextBox)frmVitalSign.FindControl("txtTemperature");
            TextBox     txtPluse       = (TextBox)frmVitalSign.FindControl("txtPluse");
            HiddenField hdnPatientID   = (HiddenField)frmVitalSign.FindControl("hdnPatientID");

            //RadioButtonList rdbtnlstGender = (RadioButtonList)frmvwAddUpdatePatient.FindControl("rdbtnlstGender");
            //HtmlTextArea txtAddress = (HtmlTextArea)frmvwAddUpdatePatient.FindControl("txtAddress");

            if (e.CommandName == "AddVitalSign")
            {
                DC_Message           _msg    = new DC_Message();
                DC_VitalSingsDetails _objAdd = new DC_VitalSingsDetails();
                _objAdd.TestDate    = Convert.ToDateTime(txtdatepicker.Text);
                _objAdd.PatientID   = Guid.Parse(hdnPatientID.Value);//Guid.Parse(Convert.ToString(frmVitalSign.DataKey.Value));
                _objAdd.BP          = txtBP.Text;
                _objAdd.Weight      = Convert.ToDecimal(txtWeight.Text);
                _objAdd.Temperature = Convert.ToDecimal(txtTemperature.Text);
                _objAdd.Pluse       = txtPluse.Text;
                _objAdd.CreatedBy   = "Ajay";

                _msg = _objDL.AddUpdateVitalDetails(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    hdnFlag.Value = "true";
                    Patient_ID    = Guid.Parse(Request.QueryString["PatientID"]);
                    BindGridView(Patient_ID);
                }
            }
            if (e.CommandName == "EditVitalSign")
            {
                DC_Message           _msg    = new DC_Message();
                DC_VitalSingsDetails _objAdd = new DC_VitalSingsDetails();
                _objAdd.PatientID   = Guid.Parse(Convert.ToString(frmVitalSign.DataKey.Value));
                _objAdd.TestDate    = Convert.ToDateTime(txtdatepicker.Text);
                _objAdd.BP          = txtBP.Text;
                _objAdd.Weight      = Convert.ToDecimal(txtWeight.Text);
                _objAdd.Temperature = Convert.ToDecimal(txtTemperature.Text);
                _objAdd.Pluse       = txtPluse.Text;
                _objAdd.EditedBy    = "Ajay";
                _msg = _objDL.AddUpdateVitalDetails(_objAdd);
                if (_msg.StatusCode == ReadOnlyMessage.StatusCode.Success)
                {
                    BootstrapAlert.BootstrapAlertMessage(divmsg, _msg.StatusMessage, BootstrapAlertType.Success);
                    hdnFlag.Value = "true";
                }
            }
        }
        protected void LoadGeographyData(MDMSVC.DC_MongoDbSyncRQ RQ)
        {
            var res = MasterSvc.SyncGeographyData(RQ);

            if (res != null)
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsg, res.StatusMessage, (BootstrapAlertType)res.StatusCode);
            }
            else
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsg, "Data Sync failed.", BootstrapAlertType.Danger);
            }
        }
        public void RunMLDATAAPI(MDMSVC.DC_Distribution_MLDataRQ _obj)
        {
            var res = MasterSvc.PushSyncMLAPIData(_obj);

            if (res != null)
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsg, res.StatusMessage, (BootstrapAlertType)res.StatusCode);
            }
            else
            {
                BootstrapAlert.BootstrapAlertMessage(dvMsg, "Hotel MappingLite Sync failed.", BootstrapAlertType.Danger);
            }
        }