public void GetClientDetailByClientID() { CustomProfile profile = CustomProfile.GetProfile(); iCustomerClient ServiceAccountMaster = new iCustomerClient(); try { mClient client = new mClient(); client = ServiceAccountMaster.GetClientDetailByClientID(Convert.ToInt64(HdnAccountId.Value), profile.DBConnection._constr); FillCompany(); if (client.CompanyID != null) { ddlcompany.SelectedIndex = ddlcompany.Items.IndexOf(ddlcompany.Items.FindByValue(client.CompanyID.ToString())); } hdnCompanyid.Value = client.CompanyID.ToString(); getCustomer(long.Parse(client.CompanyID.ToString())); if (client.CustomerID != null) { ddlcustomer.SelectedIndex = ddlcustomer.Items.IndexOf(ddlcustomer.Items.FindByValue(client.CustomerID.ToString())); } hdncustomerid.Value = client.CustomerID.ToString(); txt_custname.Text = client.Name.ToString(); txt_custcode.Text = client.Code.ToString(); txt_turnOver.Text = client.TurnOver.ToString(); TxtWebsite.Text = client.Website.ToString(); txt_CreditDays.Text = client.Creditdays.ToString(); Ddl_CompanyType.SelectedValue = null; if (client.CompType != null) { Ddl_CompanyType.SelectedValue = (client.CompType).ToString(); } Ddl_Sector.SelectedValue = (client.Sector).ToString(); if (client.Active == "Y") { rbtnYes.Checked = true; } else { rbtnNo.Checked = true; } } catch (Exception ex) { Login.Profile.ErrorHandling(ex, this, "Client Master", "GetClientDetailByClientID"); } finally { ServiceAccountMaster.Close(); } }
public void chekcLoginUserApprovalLevel(string ObjectName, long ReferenceID) { CustomProfile profile = CustomProfile.GetProfile(); tApprovalDetail approvalDetail = new tApprovalDetail(); iUC_ApprovalClient UC_ApprovalService = new iUC_ApprovalClient(); approvalDetail = UC_ApprovalService.chekcApprovalPermission(ObjectName, ReferenceID, profile.Personal.UserID, profile.DBConnection._constr); btnApproval.Attributes.Add("class", "Off FixWidth"); if (approvalDetail != null) { btnApproval.Attributes.Add("class", "FixWidth"); hdnApprovalDetailIDs.Value = approvalDetail.ID.ToString(); } }
public static List <mZone> PMprintZone(string Country, string State) { List <mZone> ZoneList = new List <mZone>(); iAddressInfoClient AddressClient = new iAddressInfoClient(); try { CustomProfile profile = CustomProfile.GetProfile(); ZoneList = AddressClient.GetZoneList(Country, State, profile.DBConnection._constr).ToList(); return(ZoneList); } catch (Exception ex) { return(ZoneList); } finally { AddressClient.Close(); } }
protected void FillDropDown() { ddlcontacttype.Items.Clear(); iContactPersonInfoClient ObjContactPerson = new iContactPersonInfoClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlcontacttype.DataSource = ObjContactPerson.GetContactTypeList(profile.DBConnection._constr); ddlcontacttype.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlcontacttype.Items.Insert(0, lst); }
protected void GetProductImagesByProductID() { CustomProfile profile = CustomProfile.GetProfile(); if (hdnprodID.Value == "") { hdnprodID.Value = "0"; } iProductMasterClient productClient = new iProductMasterClient(); GVImages.DataSource = productClient.GetProductImagesByProductID(Convert.ToInt64(hdnprodID.Value), Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr); GVImages.DataBind(); productClient.Close(); }
public Authentication CheckAuthentication(string email, string password) { var _context = _contextFactory(); var userPerson = (from u in _context.User join p in _context.Person on u.PersonId equals p.PersonId where u.Email.Equals(email) && u.LoginPassword.Equals(password) && u.Active && u.UserStatusId == (byte)GeneralEnumerators.EnumUserStatus.Ativo select new { u.UserId, u.Email, u.PersonId, u.Name, u.UserProfileId, u.UrlImagemLogo, p.PersonRules, p.PersonTypeId, p.IntegrationCode, UserIntegrationCode = u.IntegrationCode, Complete = string.IsNullOrEmpty(u.SmartPhoneNumber) ? 0 : 1 }).ToList(); if (userPerson.Count == 0) { return(null); } var auth = userPerson.Select(x => new Authentication { UserId = x.UserId, Email = x.Email, Name = x.Name, PersonId = x.PersonId, PersonTypeId = x.PersonTypeId, PersonRules = x.PersonRules, UserProfileId = x.UserProfileId, PersonIntegrationCode = x.IntegrationCode, UserIntegrationCode = x.UserIntegrationCode, Complete = x.Complete, ImgProfileLogo = x.UrlImagemLogo }).ToList(); auth.ForEach(x => x.ProfileClaims = CustomProfile.ListProfiles(x.UserProfileId, x.PersonRules.Select(y => y.PersonProfileId).ToList())); List <int> managerProfiles = Constants.DefaultManagerAccessProfile(); Authentication user = null; foreach (var item in auth) { foreach (var profileClaim in item.ProfileClaims) { if (managerProfiles.Contains(profileClaim)) { return(item); // in case of manager } } } // else return natural person return(auth.Where(x => x.PersonTypeId == (int)EnumPersonType.Natural_Person).First()); }
protected void AddBtn_Click(object sender, System.EventArgs e) { string Title, Destination, Type, Purpose, Object1; long Sequence, Field1; Title = txtTitle.Text; Destination = ddlDestination.SelectedItem.Text; Type = ddlType.SelectedItem.Text; Purpose = txtPurpose.Text; Object1 = ddlObject.SelectedItem.Text; Field1 = Convert.ToInt64(hdnSelectedField.Value); Sequence = Convert.ToInt64(txtSequence.Text); iProductCategoryMasterClient Message = new iProductCategoryMasterClient(); CustomProfile profile = CustomProfile.GetProfile(); if (hdnState.Value == "Add") { try { //Message.DeleteMessageTemptable(profile.DBConnection._constr); Message.InsertMessageIntoTemptable(Title, Destination, Type, Purpose, Object1, Field1, Sequence, profile.DBConnection._constr); GetFieldList(); txtSequence.Text = ""; ddlObject.SelectedIndex = -1; ddlField.SelectedIndex = -1; } catch { } finally { } } if (hdnState.Value == "Edit") { long MsgHeadID = Convert.ToInt64(hdnMessageID.Value); long Sequence1 = Convert.ToInt64(txtSequence.Text); long Field = Convert.ToInt64(hdnSelectedField.Value); long CreateBy = profile.Personal.UserID; try { Message.InsertMessageDetails(MsgHeadID, Field, Sequence1, CreateBy, profile.DBConnection._constr); GetFieldList(); } catch { } finally { } } }
protected void Page_Load(object sender, EventArgs e) { try { CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.UserCreationService.iUserCreationClient usercreationclient = new BrilliantWMS.UserCreationService.iUserCreationClient(); GvAccessTo.DataSource = usercreationclient.GetUserList(profile.DBConnection._constr); GvAccessTo.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "UserList.aspx.cs", "Page_Load"); } }
public static int WMAssignDriver(long hndSelectedRec, string OrderID, string TruckDetails) { iPartRequestClient assignDriver = new iPartRequestClient(); CustomProfile profile = CustomProfile.GetProfile(); string[] eorder = OrderID.Split(','); int cnt = eorder.Count(); for (int i = 0; i <= cnt - 1; i++) { assignDriver.AssignSelectedDriver(long.Parse(eorder[i].ToString()), hndSelectedRec, TruckDetails, profile.Personal.UserID, profile.DBConnection._constr); } return(1); }
public static string wmUpdateApproval(string Status, string Remark, string tApprovalIDs) { try { CustomProfile profile = CustomProfile.GetProfile(); UC_Approval uc = new UC_Approval(); return(uc.FinalUpdateApproval(Status, Remark, tApprovalIDs, profile.Personal.UserID)); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, staticThispage, "Inbox", "wmUpdateApproval"); return(""); } }
protected void GetCapacityIn() { ddlcapacityin.Items.Clear(); iWarehouseClient Warehouseclient = new iWarehouseClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlcapacityin.DataSource = Warehouseclient.GetCapacityIn(profile.DBConnection._constr); ddlcapacityin.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlcapacityin.Items.Insert(0, lst); }
public ActionResult Create(CreateStudentViewModel studentModel, string selectedUser, string lastName, string firstMidName, string email) { try { if (ModelState.IsValid) { var student = new Student(); //Establish the student data student.UserName = selectedUser; student.LastName = lastName; student.FirstMidName = firstMidName; student.Email = email; student.EnrollmentDate = DateTime.Now; db.Students.Add(student); //inputs student data into database (is not saved yet) db.SaveChanges(); //saves the student to database MembershipUser user = Membership.GetUser(student.UserName); //gets the actual user Roles.AddUserToRole(user.UserName, "Student"); //takes the user and sets role to student // assigns Student data to the profile of the user (so the user is associated with this specified Student data) CustomProfile profile = CustomProfile.GetUserProfile(student.UserName); profile.FilledStudentInfo = "yes"; profile.Save(); return(RedirectToAction("Index")); } } catch (DataException) { //Log the error (add a variable name after DataException) ModelState.AddModelError("", "Saving failed for some reason. You may have left some information blank. Please try again (several times in several different ways if possible (i.e. try using a different computer) - if the problem persists see your system administrator."); } // This code block is here to allow the page to render in case we get a DataException and have to re-display the screen. MembershipUserCollection users = Membership.GetAllUsers(); var model = new CreateStudentViewModel { Users = users.OfType <MembershipUser>().Select(x => new SelectListItem { Value = x.UserName, Text = x.UserName, }) }; return(View(model)); }
protected void FillLocationType() { ddllocationtype.Items.Clear(); iWarehouseClient Warehouseclient = new iWarehouseClient(); CustomProfile profile = CustomProfile.GetProfile(); ddllocationtype.DataSource = Warehouseclient.GetLocationType(profile.DBConnection._constr); ddllocationtype.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddllocationtype.Items.Insert(0, lst); }
protected void FillGVRequest(string FillBy, string Invoker) { iPartRequestClient objServie = new iPartRequestClient(); try { CustomProfile profile = CustomProfile.GetProfile(); GVRequest.DataSource = null; GVRequest.DataBind(); //New Added By Suresh for GWC string UserType = profile.Personal.UserType.ToString(); //New Added By Suresh for GWC if (FillBy == "UserID") { if (Invoker == "Request") { if (UserType == "User" || UserType == "Requester" || UserType == "Requestor") { GVRequest.DataSource = objServie.GetRequestSummayOfUser(profile.Personal.UserID, profile.DBConnection._constr); } else { GVRequest.DataSource = objServie.GetRequestSummayByUserID(profile.Personal.UserID, profile.DBConnection._constr); } GVRequest.Columns[12].Visible = false; GVRequest.AllowMultiRecordSelection = true; GVRequest.AllowRecordSelection = true; } else if (Invoker == "Issue") { if (UserType == "User" || UserType == "Requester" || UserType == "Requestor") { GVRequest.DataSource = objServie.GetRequestSummayOfUserIssue(profile.Personal.UserID, profile.DBConnection._constr); } else { GVRequest.DataSource = objServie.GetRequestSummayByUserIDIssue(profile.Personal.UserID, profile.DBConnection._constr); } GVRequest.Columns[12].Visible = true; GVRequest.AllowMultiRecordSelection = true; GVRequest.AllowRecordSelection = true; } } else if (FillBy == "SiteIDs") { GVRequest.DataSource = objServie.GetRequestSummayBySiteIDs(Session["SiteIDs"].ToString(), profile.DBConnection._constr); } GVRequest.DataBind(); } catch { } finally { objServie.Close(); } }
public void ResetUCApplyTax(long CartSequence, string CurrentObjectName, string SessionID, decimal TaxableAmount, string UserID) { UCApplyTaxService.iUCApplyTaxClient ApplyTaxServie = new UCApplyTaxService.iUCApplyTaxClient(); try { CustomProfile profile = CustomProfile.GetProfile(); ApplyTaxServie.ClearTempDataByCurrentObjectSessionID(CurrentObjectName + "ProductDetail", Session.SessionID, profile.DBConnection._constr); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "UCApplyTax", "ResetUCApplyTax"); } finally { ApplyTaxServie.Close(); } }
protected void ResetUserControl() { iProductMasterClient objService = new iProductMasterClient(); try { CustomProfile profile = CustomProfile.GetProfile(); UC_AttachDocument1.ClearDocument("Product"); objService.ClearTempDataFromDB(Session.SessionID, profile.Personal.UserID.ToString(), CurrentObject, profile.DBConnection._constr); hdnprodID.Value = "0"; } catch { } finally { objService.Close(); } }
protected void btnSubmit_Click(object sender, System.EventArgs e) { string Prime = "", Express = "", Regular = "", DID = ""; CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.AccountSearchService.iCustomerClient cust = new iCustomerClient(); mSLA sla = new mSLA(); if (txtPrime.Text == "NA") { Prime = "0"; } else { Prime = txtPrime.Text; } if (txtExpress.Text == "NA") { Express = "0"; } else { Express = txtExpress.Text; } if (txtRegular.Text == "NA") { Regular = "0"; } else { Regular = txtRegular.Text; } if (hdndeptid.Value == "NA") { DID = "0"; } else { DID = hdndeptid.Value; } sla.PrimeDays = long.Parse(Prime); sla.ExpressDays = long.Parse(Express); sla.RegularDays = long.Parse(Regular); sla.DeptID = long.Parse(DID); sla.CreatedBy = profile.Personal.UserID; sla.CreatedDate = DateTime.Now; cust.AddIntomSLA(sla, profile.DBConnection._constr); Response.Write("<script>window.close();</" + "script>"); Response.End(); }
public static int WMGetIssueSummaryByRequestID() { int result = 0; iPartIssueClient objService = new iPartIssueClient(); try { CustomProfile profile = CustomProfile.GetProfile(); result = objService.GetIssueSummayByRequestID(Convert.ToInt64(HttpContext.Current.Session["PORRequestID"].ToString()), profile.DBConnection._constr).Count(); } catch { } finally { objService.Close(); } return(result); }
public static List <POR_SP_GetRequestByRequestIDs_Result> WMGetRequestHead(string RequestIDs) { iPartRequestClient objService = new iPartRequestClient(); List <POR_SP_GetRequestByRequestIDs_Result> RequestHead = new List <POR_SP_GetRequestByRequestIDs_Result>(); try { CustomProfile profile = CustomProfile.GetProfile(); RequestHead = objService.GetRequestSummayByRequestIDs(RequestIDs, profile.DBConnection._constr).ToList(); } catch { } finally { objService.Close(); } return(RequestHead); }
public static List <mSubZone> PMprintSubZone(long ZoneID) { List <mSubZone> SubZoneList = new List <mSubZone>(); iAddressInfoClient AddressClient = new iAddressInfoClient(); try { CustomProfile profile = CustomProfile.GetProfile(); SubZoneList = AddressClient.GetSubZoneList(ZoneID, profile.DBConnection._constr).ToList(); return(SubZoneList); } catch (Exception ex) { return(SubZoneList); } finally { AddressClient.Close(); } }
/// <summary> /// The save new profile. /// </summary> /// <param name="model"> /// The model. /// </param> /// <param name="profile"> /// The profile. /// </param> private static void SaveNewProfile(RegisterModel model, CustomProfile profile) { profile.LastName = model.LastName; profile.FirstMidName = model.FirstMidName; profile.StreetAddress = model.StreetAddress; profile.City = model.City; profile.State = model.State; profile.ZipCode = model.ZipCode; profile.Phone = model.Phone; profile.DateOfBirth = model.DateOfBirth; profile.ParishAffiliation = model.ParishAffiliation; profile.MinistryInvolvement = model.MinistryInvolvement; profile.Save(); }
public static string WMSaveRequestHead(object objAdr, string State) { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient(); tAddress Adrs = new tAddress(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objAdr; Adrs.AddressLine1 = dictionary["AddressLine1"].ToString(); Adrs.City = dictionary["City"].ToString(); Adrs.County = "Qatar"; Adrs.State = dictionary["State"].ToString(); if (State == "Edit") { Adrs.ID = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString()); Adrs.LastModifiedBy = profile.Personal.UserID.ToString(); Adrs.LastModifiedDate = DateTime.Now; UCCommonFilter.EditAddress(Adrs, profile.DBConnection._constr); } else { long DID = Convert.ToInt64(HttpContext.Current.Session["DeptID"].ToString()); long CompanyID = UCCommonFilter.GetCompanyIDFromSiteID(DID, profile.DBConnection._constr); Adrs.ObjectName = "Account"; Adrs.ReferenceID = DID; Adrs.RouteID = CompanyID; Adrs.CompanyID = CompanyID; Adrs.Sequence = 1; Adrs.AddressType = "none"; Adrs.IsDefault = "N"; Adrs.Active = "Y";//Set Active Y N Adrs.CreatedBy = profile.Personal.UserID.ToString(); Adrs.CreationDate = DateTime.Now; UCCommonFilter.AddIntotAddress(Adrs, profile.DBConnection._constr); } result = "Address saved successfully"; } catch { result = "Some error occurred"; } finally { UCCommonFilter.Close(); } return(result); }
public List <mTerritory> GetDepartmentList(long CompanyID) { List <mTerritory> TerritoryList = new List <mTerritory>(); iTerritoryClient TerritoryClient = new iTerritoryClient(); try { CustomProfile profile = CustomProfile.GetProfile(); TerritoryList = TerritoryClient.GetDepartmentList(CompanyID, profile.DBConnection._constr).ToList(); } catch { } finally { TerritoryClient.Close(); } return(TerritoryList); }
public static void WMpageAddNew() { iPartConsumptionClient objService = new iPartConsumptionClient(); try { CustomProfile profile = CustomProfile.GetProfile(); HttpContext.Current.Session["PORConsumptionID"] = "0"; HttpContext.Current.Session["PORstate"] = "Add"; objService.ClearTempDataFromDB(HttpContext.Current.Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr); } catch { } finally { objService.Close(); } }
public static PORServiceEngineMaster.v_GetEngineDetails WMGetEngineDetails(int EngineID) { iEngineMasterClient objService = new iEngineMasterClient(); PORServiceEngineMaster.v_GetEngineDetails EngineRec = new PORServiceEngineMaster.v_GetEngineDetails(); try { CustomProfile profile = CustomProfile.GetProfile(); EngineRec = objService.GetmEngineListByID(EngineID, profile.DBConnection._constr); } catch { } finally { objService.Close(); } return(EngineRec); }
protected void FillCompany() { ddlcompany.Items.Clear(); iCompanySetupClient CompanyClient = new iCompanySetupClient(); CustomProfile profile = CustomProfile.GetProfile(); ddlcompany.DataSource = CompanyClient.GetCompanyDropDown(profile.Personal.CompanyID, profile.DBConnection._constr); ddlcompany.DataBind(); ListItem lst = new ListItem { Text = "-Select-", Value = "0" }; ddlcompany.Items.Insert(0, lst); }
protected void pageSave(Object sender, BrilliantWMS.ToolbarService.iUCToolbarClient e) { try { string result = ""; CustomProfile profile = CustomProfile.GetProfile(); iSiteMasterClient InterfaceClient = new iSiteMasterClient(); if (checkDuplicate() == "") { string Tablename = ddlTable.SelectedItem.Text; string DataType = ddlDataype.SelectedItem.Text; string FieldName = txtFieldName.Text; string IsNull = ddlIsNull.SelectedItem.Text; if (hdnInterfaceID.Value != "0" && hdnInterfaceID.Value != "") { DataSet ds = new DataSet(); long ModifyBy = Convert.ToInt64(profile.Personal.UserID.ToString()); hdnSate.Value = "Edit"; InterfaceClient.UpdateInterface(Convert.ToInt64(hdnInterfaceID.Value), Tablename, DataType, FieldName, IsNull, ModifyBy, profile.DBConnection._constr); } else { hdnSate.Value = "AddNew"; long CreatedBy = Convert.ToInt64(profile.Personal.UserID.ToString()); InterfaceClient.InsertInterface(Tablename, DataType, FieldName, IsNull, CreatedBy, profile.DBConnection._constr); } if (hdnSate.Value == "Edit") { WebMsgBox.MsgBox.Show("Record Update sussessfully"); ClearAll(); } if (hdnSate.Value == "AddNew") { WebMsgBox.MsgBox.Show("Record saved sussessfully"); ClearAll(); } } } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Product master", "pageSave"); } finally { } }
protected void GetDashboardByUserID() { iDashboardClient objService = new iDashboardClient(); try { CustomProfile profile = CustomProfile.GetProfile(); List <POR_Dashboard_UserWise> DashboardList = new List <POR_Dashboard_UserWise>(); DashboardList = objService.GetDashboardsByUserID(profile.Personal.UserID, profile.DBConnection._constr).ToList(); string str = ""; int column = 1; foreach (POR_Dashboard_UserWise dashB in DashboardList) { switch (column) { case 1: str = str + "<tr><td>" + "<iframe src='../Dashboard/BindDashboard.aspx?ID=" + dashB.ID.ToString() + "' style='border: none; height: 100%; width: 100%'></iframe>" + "</td>"; column += 1; break; case 2: str = str + "<td>" + "<iframe src='../Dashboard/BindDashboard.aspx?ID=" + dashB.ID.ToString() + "' style='border: none; height: 100%; width: 100%'></iframe>" + "</td>"; column += 1; break; case 3: str = str + "<td>" + "<iframe src='../Dashboard/BindDashboard.aspx?ID=" + dashB.ID.ToString() + "' style='border: none; height: 100%; width: 100%'></iframe>" + "</td></tr>"; column = 1; break; } } if (str.EndsWith("</tr>") == false) { str = str + "</tr>"; } tableLeft.InnerHtml = str; } catch { } finally { objService.Close(); } }
public void GetTransferDetails(string TransferID) { long TRID = long.Parse(TransferID); BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); BrilliantWMS.WMSInbound.iInboundClient Inbound = new WMSInbound.iInboundClient(); CustomProfile profile = CustomProfile.GetProfile(); iUCCommonFilterClient objService = new iUCCommonFilterClient(); List <vGetUserProfileByUserID> UsersList = new List <vGetUserProfileByUserID>(); try { BrilliantWMS.WMSOutbound.tTransferHead trh = new WMSOutbound.tTransferHead(); //= new tTransferHead(); trh = Outbound.GetTransferHeadDetailByTransferID(TRID, profile.DBConnection._constr); lblWTWTransferNo.Text = trh.ID.ToString(); UCWTWTransferDate.Date = trh.TransferDate; fillUser(); ddlWTWTransferBy.SelectedIndex = ddlWTWTransferBy.Items.IndexOf(ddlWTWTransferBy.Items.FindByValue(trh.TransferBy.ToString())); ddlWTWStatus.DataSource = WMFillStatus(); ddlWTWStatus.DataBind(); ddlWTWStatus.SelectedIndex = ddlWTWStatus.Items.IndexOf(ddlWTWStatus.Items.FindByValue(trh.Status.ToString())); fillWarehouse(); ddlFWarehouse.SelectedIndex = ddlFWarehouse.Items.IndexOf(ddlFWarehouse.Items.FindByValue(trh.FromPosition.ToString())); List <BrilliantWMS.WMSInbound.mWarehouseMaster> ToWarehouseList = new List <WMSInbound.mWarehouseMaster>(); long UserID = profile.Personal.UserID; ToWarehouseList = Inbound.GetUserWarehouse(UserID, profile.DBConnection._constr).ToList(); ddlTWarehouse.DataSource = ToWarehouseList; ddlTWarehouse.DataBind(); ddlTWarehouse.SelectedIndex = ddlTWarehouse.Items.IndexOf(ddlTWarehouse.Items.FindByValue(trh.ToPosition.ToString())); WTWTRemark.Text = trh.Remark.ToString(); txtAirwayBill.Text = trh.AirwayBill.ToString(); txtShippingType.Text = trh.ShippingType.ToString(); UC_ShippingDate.Date = trh.ShippingDate; UCExpDeliveryDate.Date = trh.ExpDeliveryDate; txtTransporterName.Text = trh.TransporterName.ToString(); Grid1.DataSource = Outbound.GetTransferPartDetailByTransferID(TRID, long.Parse(trh.FromPosition.ToString()), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr); Grid1.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeRequest" + Session.SessionID, "changemode(true, 'divWTWTransferDetail');LoadingOff();", true); } catch { } finally { Outbound.Close(); objService.Close(); UsersList.Clear(); } }
public static decimal WMGetTotalQty() { iPartRequestClient objService = new iPartRequestClient(); decimal tot = 0; try { CustomProfile profile = CustomProfile.GetProfile(); POR_SP_GetPartDetail_ForRequest_Result PartRequest = new POR_SP_GetPartDetail_ForRequest_Result(); tot = objService.GetTotalQTYFromTempData(HttpContext.Current.Session.SessionID, ObjectName, profile.Personal.UserID.ToString(), profile.DBConnection._constr); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, "PartRequestEntry.aspx", "WMGetTotalQty"); } finally { objService.Close(); } return(tot); }
internal SectionDoubleStacked(CustomProfile ShapeUpper, CustomProfile ShapeLower, double d_tops) { if (ShapeLower.Section is Wosad.Common.Section.CompoundShape && ShapeUpper.Section is Wosad.Common.Section.CompoundShape) { Wosad.Common.Section.CompoundShape lowerSectionComp = ShapeLower.Section as Wosad.Common.Section.CompoundShape; Wosad.Common.Section.CompoundShape upperSectionComp = ShapeUpper.Section as Wosad.Common.Section.CompoundShape; Wosad.Common.Section.SectionDoubleStacked section = new Wosad.Common.Section.SectionDoubleStacked(upperSectionComp, lowerSectionComp, d_tops); Section = section; } else { throw new Exception("Provided shape type is not supported. Please select a different shape as parameter."); } }
/// <summary> /// Creates a custom profile object consisting of 2 stacked shapes on top of each other, separated by a vertical distance d_tops, measured as distance between top of lower shape and top of upper shape. /// </summary> /// <param name="ShapeUpper">Upper shape object</param> /// <param name="ShapeLower">Lower shape object</param> /// <param name="d_tops">Distance measured between top of lower shape and top of upper shape.</param> /// <returns></returns> public static SectionDoubleStacked ByShapesAndTopToTopDistance(CustomProfile ShapeUpper, CustomProfile ShapeLower, double d_tops) { return new SectionDoubleStacked(ShapeUpper, ShapeLower, d_tops); }
protected void btnLogin_Click(object sender, EventArgs e) { strUserName = txtUsername.Text.Trim(); strPassword = txtPassword.Text.Trim(); divErrorMessage.Visible = false; lblLoginMessage.Text = string.Empty; try { if (!string.IsNullOrEmpty(strUserName) && !string.IsNullOrEmpty(strPassword)) { bool blValResult = Membership.ValidateUser(strUserName, strPassword); if (blValResult) { // memUser = Membership.GetUser(strUserName); ////Get all the roles for the signed in user // string[] roles = Roles.GetRolesForUser(strUserName); // //Get the roles allowed in the service // string[] AllowedRoles = objServ.AllowedRoles.Split(','); // if (AllowedRoles[0] != string.Empty) // { // foreach (string strAllowedRole in AllowedRoles) // { // var srchString = strAllowedRole; // var strFound = Array.FindAll(roles, str => str.ToLower().Trim().Equals(srchString.ToLower().Trim())); // if (strFound.ToList().Count > 0) // { // //if role exists in the roles for the particular user, set flag allow to true // Allow = true; // break; // } // } // } // else // { // Response.Redirect("Default.aspx", false); // //Server.Transfer("Default.aspx"); // } //if (Allow) //{ objProf = Profile.GetProfile(strUserName); cus = objProf.MyCustomProfile; //Add tgheAuthenticated user detiails objUserInfo = objUserInfo.getUserInfoObject; objUserInfo.UserId = 0; objUserInfo.UserName = strUserName; objUserInfo.IsAuthenticated = true; //Add the User Object to Session Session.Add("objUserInfo", objUserInfo); //Add the UserFavouites to Session Session["UserFavorites"] = objProf.MyCustomProfile.FavoriteList; //Redirect to Default Page if (Session["RedirectURL"] != null) { string str = Session["RedirectURL"].ToString(); str = str.Substring(0, str.LastIndexOf('/')); str = str + "/" + strFinalPubName; Response.Redirect(str + "/default2.aspx", false); HttpContext.Current.ApplicationInstance.CompleteRequest(); } //} //else //{ // lblLoginMessage.Text = objCommonUtil.getTransText(Constants.LOGIN_NOPUBACCESS); // divErrorMessage.Visible = true; //} } else { lblLoginMessage.Text = objCommonUtil.getTransText(Constants.LOGIN_INVALID_CREDENTIALS); divErrorMessage.Visible = true; } } } catch (Exception ex) { lblLoginMessage.Text = objCommonUtil.getTransText(Constants.LOGIN_GENERIC_ERROR); divErrorMessage.Visible = true; al = new ArrayList(); al.Add(strFinalPubName); al.Add(LOGIN_MODULE); al.Add(objUserInfo.UserName); AgriCastException currEx = new AgriCastException(al, ex); AgriCastLogger.Publish(currEx, AgriCastLogger.LogType.Error); } }